Remove testNG dependencies (part 2)
[sdc.git] / openecomp-be / api / openecomp-sdc-rest-webapp / vendor-license-rest / vendor-license-rest-services / src / test / java / org / openecomp / sdcrests / vendorlicense / rest / mapping / MapFeatureGroupEntityToFeatureGroupDescriptorDtoTest.java
1 /*
2  * Copyright © 2016-2018 European Support Limited
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.openecomp.sdcrests.vendorlicense.rest.mapping;
18
19
20 import static org.junit.jupiter.api.Assertions.assertEquals;
21
22 import org.junit.jupiter.api.Test;
23 import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity;
24 import org.openecomp.sdcrests.vendorlicense.types.FeatureGroupDescriptorDto;
25
26
27 class MapFeatureGroupEntityToFeatureGroupDescriptorDtoTest {
28
29     @Test
30     void testDescription() {
31         FeatureGroupEntity source = new FeatureGroupEntity();
32         FeatureGroupDescriptorDto target = new FeatureGroupDescriptorDto();
33         MapFeatureGroupEntityToFeatureGroupDescriptorDto mapper =
34                 new MapFeatureGroupEntityToFeatureGroupDescriptorDto();
35         String param = "0173a1e0-f713-413c-854b-152d35228616";
36         source.setDescription(param);
37         mapper.doMapping(source, target);
38         assertEquals(target.getDescription(), param);
39     }
40
41     @Test
42     void testName() {
43         FeatureGroupEntity source = new FeatureGroupEntity();
44         FeatureGroupDescriptorDto target = new FeatureGroupDescriptorDto();
45         MapFeatureGroupEntityToFeatureGroupDescriptorDto mapper =
46                 new MapFeatureGroupEntityToFeatureGroupDescriptorDto();
47         String param = "d0a3212d-06c6-455e-ab36-b1fd63eefeca";
48         source.setName(param);
49         mapper.doMapping(source, target);
50         assertEquals(target.getName(), param);
51     }
52
53     @Test
54     void testPartNumber() {
55         FeatureGroupEntity source = new FeatureGroupEntity();
56         FeatureGroupDescriptorDto target = new FeatureGroupDescriptorDto();
57         MapFeatureGroupEntityToFeatureGroupDescriptorDto mapper =
58                 new MapFeatureGroupEntityToFeatureGroupDescriptorDto();
59         String param = "562265f0-abe0-44e9-9ee4-3cf2f5436ea9";
60         source.setPartNumber(param);
61         mapper.doMapping(source, target);
62         assertEquals(target.getPartNumber(), param);
63     }
64 }