aboutsummaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-04-04 17:31:43 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-04 17:31:43 +0000
commitf81920304c7b62637d32473e672a1e51275ce54b (patch)
tree35332de491929d0b278a4698f530f512ce28d46c /adapters
parent5f78643c42dd12588a1688f658ca6e134674ea29 (diff)
parent88c47a23b9428188ff5dd0b46941f8856465376b (diff)
Merge "PNF WF post instantiation configuration"
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java
index 599c99b435..448077717a 100644
--- a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java
+++ b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java
@@ -658,4 +658,31 @@ public class CatalogDbClientTest extends CatalogDbAdapterBaseTest {
Assert.assertNull(pnfResourceCustomization);
}
+ @Test
+ public void getPnfResourceCustomizationFromJoinTable_validServiceUuid_expectedOutput() {
+ List<PnfResourceCustomization> pnfResourceCustomizationList = client
+ .getPnfResourceCustomizationByModelUuid("5df8b6de-2083-11e7-93ae-92361f002676");
+ assertEquals(1, pnfResourceCustomizationList.size());
+
+ PnfResourceCustomization pnfResourceCustomization= pnfResourceCustomizationList.get(0);
+ assertEquals("modelInstanceName", "PNF routing", pnfResourceCustomization.getModelInstanceName());
+ assertEquals("blueprintName", "test_configuration_restconf", pnfResourceCustomization.getBlueprintName());
+ assertEquals("blueprintVersion", "1.0.0", pnfResourceCustomization.getBlueprintVersion());
+ PnfResource pnfResource = pnfResourceCustomization.getPnfResources();
+ assertNotNull(pnfResource);
+
+ assertEquals("PNFResource modelUUID", "ff2ae348-214a-11e7-93ae-92361f002680", pnfResource.getModelUUID());
+ assertEquals("PNFResource modelInvariantUUID", "2fff5b20-214b-11e7-93ae-92361f002680",
+ pnfResource.getModelInvariantUUID());
+ assertEquals("PNFResource modelVersion", "1.0", pnfResource.getModelVersion());
+ assertEquals("PNFResource orchestration mode", "", pnfResource.getOrchestrationMode());
+ }
+
+ @Test
+ public void getPnfResourceCustomizationFromJoinTable_invalidServiceUuid_nullOutput() {
+ List<PnfResourceCustomization> pnfResourceCustomizationList = client
+ .getPnfResourceCustomizationByModelUuid(UUID.randomUUID().toString());
+ assertEquals(0, pnfResourceCustomizationList.size());
+ }
+
}