9ec43e9226e4db68be00898d8fbcf6a7cd2b9e9d
[sdc.git] /
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.vsp.rest.mapping;
18
19 import static org.junit.Assert.assertEquals;
20
21 import org.junit.Test;
22 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
23 import org.openecomp.sdcrests.vendorsoftwareproducts.types.VspDescriptionDto;
24
25 /**
26  * This class was generated.
27  */
28 public class MapVspDescriptionDtoToVspDetailsTest {
29
30     @Test()
31     public void testConversion() {
32
33         final VspDescriptionDto source = new VspDescriptionDto();
34
35         final String name = "e507ee61-df86-4cbd-8efc-fc5ac7182a42";
36         source.setName(name);
37
38         final String description = "9493bf30-d5dd-4436-9cf8-917ef5a9f2c4";
39         source.setDescription(description);
40
41         final String icon = "593e7453-239d-4979-abc7-2b3d0c9bfa30";
42         source.setIcon(icon);
43
44         final String category = "0dee3401-f7e5-4da4-bd36-8f88c4380884";
45         source.setCategory(category);
46
47         final String subCategory = "4db52d19-bb60-4490-b88a-a14d1237316a";
48         source.setSubCategory(subCategory);
49
50         final String vendorName = "200378cb-ee09-47fb-975b-25fe4ddd3794";
51         source.setVendorName(vendorName);
52
53         final String vendorId = "a634f9b4-685e-4903-b23d-572b67d1374c";
54         source.setVendorId(vendorId);
55
56         final VspDetails target = new VspDetails();
57         final MapVspDescriptionDtoToVspDetails mapper = new MapVspDescriptionDtoToVspDetails();
58         mapper.doMapping(source, target);
59
60         assertEquals(name, target.getName());
61         assertEquals(description, target.getDescription());
62         assertEquals(category, target.getCategory());
63         assertEquals(subCategory, target.getSubCategory());
64         assertEquals(icon, target.getIcon());
65         assertEquals(vendorName, target.getVendorName());
66         assertEquals(vendorId, target.getVendorId());
67     }
68 }