Onboarding upload control
[sdc.git] / openecomp-be / lib / openecomp-sdc-vendor-software-product-lib / openecomp-sdc-vendor-software-product-api / src / test / java / org / openecomp / sdc / vendorsoftwareproduct / dao / type / VspUploadStatusTest.java
1 /*
2  * -
3  *  ============LICENSE_START=======================================================
4  *  Copyright (C) 2022 Nordix Foundation.
5  *  ================================================================================
6  *  Licensed under the Apache License, Version 2.0 (the "License");
7  *  you may not use this file except in compliance with the License.
8  *  You may obtain a copy of the License at
9  *
10  *       http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *  Unless required by applicable law or agreed to in writing, software
13  *  distributed under the License is distributed on an "AS IS" BASIS,
14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *  See the License for the specific language governing permissions and
16  *  limitations under the License.
17  *
18  *  SPDX-License-Identifier: Apache-2.0
19  *  ============LICENSE_END=========================================================
20  */
21
22 package org.openecomp.sdc.vendorsoftwareproduct.dao.type;
23
24 import static org.junit.jupiter.api.Assertions.assertEquals;
25 import static org.junit.jupiter.api.Assertions.assertFalse;
26 import static org.junit.jupiter.api.Assertions.assertTrue;
27
28 import java.util.List;
29 import org.junit.jupiter.api.Test;
30
31 class VspUploadStatusTest {
32
33     @Test
34     void isCompleteStatus() {
35         assertTrue(VspUploadStatus.SUCCESS.isCompleteStatus());
36         assertTrue(VspUploadStatus.ERROR.isCompleteStatus());
37         assertFalse(VspUploadStatus.UPLOADING.isCompleteStatus());
38         assertFalse(VspUploadStatus.PROCESSING.isCompleteStatus());
39     }
40
41     @Test
42     void getCompleteStatusTest() {
43         final List<VspUploadStatus> completeStatus = VspUploadStatus.getCompleteStatus();
44         assertEquals(2, completeStatus.size());
45         assertTrue(completeStatus.contains(VspUploadStatus.SUCCESS));
46         assertTrue(completeStatus.contains(VspUploadStatus.ERROR));
47     }
48 }