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 / MapVendorLicenseModelRequestDtoToVendorLicenseModelEntityTest.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 import static org.junit.jupiter.api.Assertions.assertEquals;
20
21 import org.openecomp.sdc.vendorlicense.dao.types.VendorLicenseModelEntity;
22 import org.openecomp.sdcrests.vendorlicense.types.VendorLicenseModelRequestDto;
23 import org.junit.jupiter.api.Test;
24
25
26 class MapVendorLicenseModelRequestDtoToVendorLicenseModelEntityTest {
27
28     @Test
29     void testDescription() {
30         VendorLicenseModelRequestDto source = new VendorLicenseModelRequestDto();
31         VendorLicenseModelEntity target = new VendorLicenseModelEntity();
32         MapVendorLicenseModelRequestDtoToVendorLicenseModelEntity mapper =
33                 new MapVendorLicenseModelRequestDtoToVendorLicenseModelEntity();
34         String param = "b77cbdda-ad74-49df-81e6-60438f5f5ff5";
35         source.setDescription(param);
36         mapper.doMapping(source, target);
37         assertEquals(target.getDescription(), param);
38     }
39
40     @Test
41     void testVendorName() {
42         VendorLicenseModelRequestDto source = new VendorLicenseModelRequestDto();
43         VendorLicenseModelEntity target = new VendorLicenseModelEntity();
44         MapVendorLicenseModelRequestDtoToVendorLicenseModelEntity mapper =
45                 new MapVendorLicenseModelRequestDtoToVendorLicenseModelEntity();
46         String param = "e0559039-599b-447c-a859-fec2cc26e08d";
47         source.setVendorName(param);
48         mapper.doMapping(source, target);
49         assertEquals(target.getVendorName(), param);
50     }
51
52     @Test
53     void testIconRef() {
54         VendorLicenseModelRequestDto source = new VendorLicenseModelRequestDto();
55         VendorLicenseModelEntity target = new VendorLicenseModelEntity();
56         MapVendorLicenseModelRequestDtoToVendorLicenseModelEntity mapper =
57                 new MapVendorLicenseModelRequestDtoToVendorLicenseModelEntity();
58         String param = "e79f4e78-ff71-4033-a8d8-3b86d08c9366";
59         source.setIconRef(param);
60         mapper.doMapping(source, target);
61         assertEquals(target.getIconRef(), param);
62     }
63 }