diff options
Diffstat (limited to 'appc-dispatcher/appc-license-manager')
3 files changed, 19 insertions, 15 deletions
diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/onap/appc/licmgr/impl/LicenseManagerImplTest.java b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/onap/appc/licmgr/impl/LicenseManagerImplTest.java index 9d2fb87b4..ad924ca0a 100644 --- a/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/onap/appc/licmgr/impl/LicenseManagerImplTest.java +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/onap/appc/licmgr/impl/LicenseManagerImplTest.java @@ -4,6 +4,8 @@ * ================================================================================ * Modifications Copyright (C) 2018 Nokia * ================================================================================ + * Modifications Copyright (C) 2019 AT&T Intellectual Property + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -61,15 +63,15 @@ public class LicenseManagerImplTest { public void retrieveLicenseModel_shouldThrowException_whenRetrieveLicenseModelDataIsEmpty() { // GIVEN - String expectedMessage = String - .format("License model not found for vnfType='%s' and vnfVersion='%s'", VNF_TYPE, VNF_VERSION); + String expectedMessage = + String.format("License model not found for vnfType='%s' and vnfVersion='%s'", VNF_TYPE, VNF_VERSION); given(licenseDataAccessService.retrieveLicenseModelData(VNF_TYPE, VNF_VERSION)) - .willReturn(Collections.emptyMap()); + .willReturn(Collections.emptyMap()); // WHEN THEN assertThatExceptionOfType(DataAccessException.class) - .isThrownBy(() -> licenseManager.retrieveLicenseModel(VNF_TYPE, VNF_VERSION)) - .withMessage(expectedMessage); + .isThrownBy(() -> licenseManager.retrieveLicenseModel(VNF_TYPE, VNF_VERSION)) + .withMessage(expectedMessage); } @Test @@ -81,11 +83,11 @@ public class LicenseManagerImplTest { Map<String, String> licenseModelData = new HashMap<>(); licenseModelData.put(ARTIFACT_CONTENT.name(), malformedXml); given(licenseDataAccessService.retrieveLicenseModelData(VNF_TYPE, VNF_VERSION)) - .willReturn(licenseModelData); + .willReturn(licenseModelData); // WHEN THEN assertThatExceptionOfType(DataAccessException.class) - .isThrownBy(() -> licenseManager.retrieveLicenseModel(VNF_TYPE, VNF_VERSION)); + .isThrownBy(() -> licenseManager.retrieveLicenseModel(VNF_TYPE, VNF_VERSION)); } @Test @@ -102,7 +104,7 @@ public class LicenseManagerImplTest { Map<String, String> licenseModelData = new HashMap<>(); licenseModelData.put(ARTIFACT_CONTENT.name(), correctlyFormedXml); given(licenseDataAccessService.retrieveLicenseModelData(VNF_TYPE, VNF_VERSION)) - .willReturn(licenseModelData); + .willReturn(licenseModelData); // WHEN LicenseModel licenseModel = licenseManager.retrieveLicenseModel(VNF_TYPE, VNF_VERSION); @@ -111,4 +113,4 @@ public class LicenseManagerImplTest { assertEquals(expectedEntitlementPool, licenseModel.getEntitlementPoolUuid()); assertEquals(expectedKeyGroup, licenseModel.getLicenseKeyGroupUuid()); } -}
\ No newline at end of file +} diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/onap/appc/licmgr/impl/XmlToLicenseModelConverterTest.java b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/onap/appc/licmgr/impl/XmlToLicenseModelConverterTest.java index d0c48cc93..2dd3fde51 100644 --- a/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/onap/appc/licmgr/impl/XmlToLicenseModelConverterTest.java +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/onap/appc/licmgr/impl/XmlToLicenseModelConverterTest.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2018 Nokia * ============================================================================= + * Modifications Copyright (C) 2019 AT&T Intellectual Property + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -57,7 +59,7 @@ public class XmlToLicenseModelConverterTest { // WHEN converter.convert((a, b) -> { - }, anyString(), null); + }, anyString(), null); // THEN then(xmlStreamReader).should().close(); @@ -72,9 +74,9 @@ public class XmlToLicenseModelConverterTest { // WHEN THEN assertThatExceptionOfType(XMLStreamException.class) - .isThrownBy(() -> converter.convert((a, b) -> { - throw new XMLStreamException(); - }, anyString(), null)); + .isThrownBy(() -> converter.convert((a, b) -> { + throw new XMLStreamException(); + }, anyString(), null)); then(xmlStreamReader).should().close(); } -}
\ No newline at end of file +} diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/resources/test-vf-license-model.xml b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/resources/test-vf-license-model.xml index 6f32f50b8..9f0b2b6ed 100644 --- a/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/resources/test-vf-license-model.xml +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/resources/test-vf-license-model.xml @@ -60,4 +60,4 @@ </license-key-group-list> </feature-group> </feature-group-list> -</vf-license-model>
\ No newline at end of file +</vf-license-model> |