diff options
author | 2021-02-12 13:53:13 +0100 | |
---|---|---|
committer | 2021-02-17 15:43:47 +0000 | |
commit | f2c0a4118c3c0b6360b639622766543bd754b59c (patch) | |
tree | 19e8aa82bc11dd1be0d487dde833cbaa33d69cfd /openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/mapping/MapVspDescriptionDtoToVspDetailsTest.java | |
parent | 7f418398a37283d68c0fc934e0e4a91f529fe466 (diff) |
Creation of Vendor Licensing Model is an optional step in VSP onboarding
Issue-ID: SDC-3471
Signed-off-by: JerzySzachniewicz <jerzy.szachniewicz@nokia.com>
Change-Id: Icb98d0832c49939e200ece77f4ca26744cb82222
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/mapping/MapVspDescriptionDtoToVspDetailsTest.java')
1 files changed, 22 insertions, 1 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/mapping/MapVspDescriptionDtoToVspDetailsTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/mapping/MapVspDescriptionDtoToVspDetailsTest.java index 9ec43e9226..20a544927e 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/mapping/MapVspDescriptionDtoToVspDetailsTest.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/mapping/MapVspDescriptionDtoToVspDetailsTest.java @@ -17,9 +17,13 @@ package org.openecomp.sdcrests.vsp.rest.mapping; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; -import org.junit.Test; +import java.util.Collections; +import org.junit.jupiter.api.Test; +import org.openecomp.sdc.vendorsoftwareproduct.dao.type.LicenseType; import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails; +import org.openecomp.sdc.vendorsoftwareproduct.types.LicensingData; import org.openecomp.sdcrests.vendorsoftwareproducts.types.VspDescriptionDto; /** @@ -65,4 +69,21 @@ public class MapVspDescriptionDtoToVspDetailsTest { assertEquals(vendorName, target.getVendorName()); assertEquals(vendorId, target.getVendorId()); } + + @Test + public void testLicenceTypeMapping() { + final VspDescriptionDto source = new VspDescriptionDto(); + LicensingData licensingData = new LicensingData(); + licensingData.setLicenseAgreement("testLicenseAgreement"); + licensingData.setFeatureGroups(Collections.emptyList()); + source.setLicenseType(LicenseType.EXTERNAL); + source.setLicensingData(licensingData); + + final VspDetails target = new VspDetails(); + final MapVspDescriptionDtoToVspDetails mapper = new MapVspDescriptionDtoToVspDetails(); + mapper.doMapping(source, target); + assertEquals(LicenseType.EXTERNAL.name(), target.getLicenseType()); + assertNull(target.getLicenseAgreement()); + assertNull(target.getFeatureGroups()); + } } |