summaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl/aai
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2018-03-02 16:02:28 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-02 16:02:28 +0000
commit3a45894ccb1f29ae0d227edae0eac064388fe59f (patch)
treef3b37caceec7e20b56824a6e12d16bbb43819176 /controlloop/common/model-impl/aai
parentc11d90593b95f03f4b555af0c10ddf3bb2b262c1 (diff)
parent12db2b732e1e7191c2f48e23f1e14f6d81bf2cee (diff)
Merge "Reduce Technical Debt on drools-applications"
Diffstat (limited to 'controlloop/common/model-impl/aai')
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAIGETVnfResponseTest.java22
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAIGETVserverResponseTest.java56
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQCloudRegionTest.java12
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQExtraPropertyTest.java4
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQGenericVNFTest.java54
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQInventoryResponseItemsTest.java2
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQServiceInstanceTest.java16
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQTenantTest.java6
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQVServerTest.java16
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQVfModuleTest.java32
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/PNFInstanceTest.java2
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipDataTest.java4
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipListTest.java32
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipTest.java36
14 files changed, 148 insertions, 146 deletions
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAIGETVnfResponseTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAIGETVnfResponseTest.java
index b5de93ccb..9a4050f1a 100644
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAIGETVnfResponseTest.java
+++ b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAIGETVnfResponseTest.java
@@ -44,15 +44,15 @@ public class AAIGETVnfResponseTest {
response.setIsClosedLoopDisabled("false");
response.setResourceVersion("1494001988835");
response.setModelInvariantId("f18be3cd-d446-456e-9109-121d9b62feaa");
- assertEquals(response.getVnfID(), "83f674e8-7555-44d7-9a39-bdc3770b0491");
- assertEquals(response.getVnfName(), "lll_vnf_010317");
- assertEquals(response.getVnfType(), "Basa-122216-Service/VidVsamp12BaseVolume 1");
- assertEquals(response.getServiceId(), "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb");
- assertEquals(response.getOrchestrationStatus(), "Created");
- assertEquals(response.getInMaint(), "false");
- assertEquals(response.getIsClosedLoopDisabled(), "false");
- assertEquals(response.getResourceVersion(), "1494001988835");
- assertEquals(response.getModelInvariantId(), "f18be3cd-d446-456e-9109-121d9b62feaa");
+ assertEquals("83f674e8-7555-44d7-9a39-bdc3770b0491", response.getVnfID());
+ assertEquals("lll_vnf_010317", response.getVnfName());
+ assertEquals("Basa-122216-Service/VidVsamp12BaseVolume 1", response.getVnfType());
+ assertEquals("a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", response.getServiceId());
+ assertEquals("Created", response.getOrchestrationStatus());
+ assertEquals("false", response.getInMaint());
+ assertEquals("false", response.getIsClosedLoopDisabled());
+ assertEquals("1494001988835", response.getResourceVersion());
+ assertEquals("f18be3cd-d446-456e-9109-121d9b62feaa", response.getModelInvariantId());
RelationshipList relationshipList = new RelationshipList();
Relationship relationship = new Relationship();
@@ -76,8 +76,8 @@ public class AAIGETVnfResponseTest {
item.setPropertyKey("service-instance.service-instance-name");
item.setPropertyValue("lll_svc_010317");
relatedToProperty.getRelatedTo().add(item);
- assertEquals(item.getPropertyKey(), "service-instance.service-instance-name");
- assertEquals(item.getPropertyValue(), "lll_svc_010317");
+ assertEquals("service-instance.service-instance-name", item.getPropertyKey());
+ assertEquals("lll_svc_010317", item.getPropertyValue());
relationship.setRelatedTo("service-instance");
relationship.setRelatedLink("/aai/v11/business/customers/customer/MSO_1610_ST/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/e1e9c97c-02c0-4919-9b4c-eb5d5ef68970");
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAIGETVserverResponseTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAIGETVserverResponseTest.java
index 7cf0696b5..65c2cdc81 100644
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAIGETVserverResponseTest.java
+++ b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAIGETVserverResponseTest.java
@@ -33,45 +33,47 @@ public class AAIGETVserverResponseTest {
@Test
public void test() {
- AAIGETVserverResponse response = new AAIGETVserverResponse();
+ AAIGETVserverResponse response = new AAIGETVserverResponse();
- response.setVserverID("d0668d4f-c25e-4a1b-87c4-83845c01efd8");
- response.setVserverName("USMSO1SX7NJ0103UJZZ01-vjunos0");
- response.setVserverName2("vjunos0");
- response.setVserverSelflink("https://aai-ext1.test.aaa.com:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/aaa-aic/AAIAIC25/tenants/tenant/USMSO1SX7NJ0103UJZZ01%3A%3AuCPE-VMS/vservers/vserver/d0668d4f-c25e-4a1b-87c4-83845c01efd8");
- response.setInMaint("false");
- response.setIsClosedLoopDisabled("false");
- response.setResourceVersion("1494001931513");
+ response.setVserverID("d0668d4f-c25e-4a1b-87c4-83845c01efd8");
+ response.setVserverName("USMSO1SX7NJ0103UJZZ01-vjunos0");
+ response.setVserverName2("vjunos0");
+ response.setVserverSelflink("https://aai-ext1.test.aaa.com:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/aaa-aic/AAIAIC25/tenants/tenant/USMSO1SX7NJ0103UJZZ01%3A%3AuCPE-VMS/vservers/vserver/d0668d4f-c25e-4a1b-87c4-83845c01efd8");
+ response.setInMaint("false");
+ response.setIsClosedLoopDisabled("false");
+ response.setResourceVersion("1494001931513");
- assertEquals(response.getVserverID(), "d0668d4f-c25e-4a1b-87c4-83845c01efd8");
- assertEquals(response.getVserverName(), "USMSO1SX7NJ0103UJZZ01-vjunos0");
- assertEquals(response.getVserverName2(), "vjunos0");
- assertEquals(response.getVserverSelflink(), "https://aai-ext1.test.aaa.com:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/aaa-aic/AAIAIC25/tenants/tenant/USMSO1SX7NJ0103UJZZ01%3A%3AuCPE-VMS/vservers/vserver/d0668d4f-c25e-4a1b-87c4-83845c01efd8");
- assertEquals(response.getInMaint(), "false");
- assertEquals(response.getIsClosedLoopDisabled(), "false");
- assertEquals(response.getResourceVersion(), "1494001931513");
+ assertEquals("d0668d4f-c25e-4a1b-87c4-83845c01efd8", response.getVserverID());
+ assertEquals("USMSO1SX7NJ0103UJZZ01-vjunos0", response.getVserverName());
+ assertEquals("vjunos0", response.getVserverName2());
+ assertEquals("https://aai-ext1.test.aaa.com:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/"
+ + "aaa-aic/AAIAIC25/tenants/tenant/USMSO1SX7NJ0103UJZZ01%3A%3AuCPE-VMS/vservers/vserver/d0668d4f-c25e-4a1b-87c4-83845c01efd8",
+ response.getVserverSelflink());
+ assertEquals("false", response.getInMaint());
+ assertEquals("false", response.getIsClosedLoopDisabled());
+ assertEquals("1494001931513", response.getResourceVersion());
RelationshipList relationshipList = new RelationshipList();
Relationship relationship = new Relationship();
RelationshipData relationshipData = new RelationshipData();
RelationshipDataItem relationshipDataItem = new RelationshipDataItem();
- relationshipDataItem.setRelationshipKey("customer.global-customer-id");
- relationshipDataItem.setRelationshipValue("MSO_1610_ST");
+ relationshipDataItem.setRelationshipKey("customer.global-customer-id");
+ relationshipDataItem.setRelationshipValue("MSO_1610_ST");
relationshipData.getRelationshipData().add(relationshipDataItem);
- relationshipDataItem.setRelationshipKey("service-subscription.service-type");
- relationshipDataItem.setRelationshipValue("MSO-dev-service-type");
+ relationshipDataItem.setRelationshipKey("service-subscription.service-type");
+ relationshipDataItem.setRelationshipValue("MSO-dev-service-type");
relationshipData.getRelationshipData().add(relationshipDataItem);
- relationshipDataItem.setRelationshipKey("service-instance.service-instance-id");
- relationshipDataItem.setRelationshipValue("e1e9c97c-02c0-4919-9b4c-eb5d5ef68970");
+ relationshipDataItem.setRelationshipKey("service-instance.service-instance-id");
+ relationshipDataItem.setRelationshipValue("e1e9c97c-02c0-4919-9b4c-eb5d5ef68970");
relationshipData.getRelationshipData().add(relationshipDataItem);
RelatedToProperty relatedToProperty = new RelatedToProperty();
- RelatedToPropertyItem item = new RelatedToPropertyItem();
- item.setPropertyKey("service-instance.service-instance-name");
- item.setPropertyValue("lll_svc_010317");
+ RelatedToPropertyItem item = new RelatedToPropertyItem();
+ item.setPropertyKey("service-instance.service-instance-name");
+ item.setPropertyValue("lll_svc_010317");
relatedToProperty.getRelatedTo().add(item);
relationship.setRelatedTo("service-instance");
@@ -80,12 +82,12 @@ public class AAIGETVserverResponseTest {
relationship.setRelatedToProperty(relatedToProperty);
relationshipList.getRelationshipList().add(relationship);
- response.setRelationshipList(relationshipList);
- assertEquals(response.getRelationshipList(), relationshipList);
+ response.setRelationshipList(relationshipList);
+ assertEquals(response.getRelationshipList(), relationshipList);
response.setRequestError(null);
assertNull(response.getRequestError());
logger.info(Serialization.gsonPretty.toJson(response));
}
-} \ No newline at end of file
+}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQCloudRegionTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQCloudRegionTest.java
index f5c594088..5d1fe278c 100644
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQCloudRegionTest.java
+++ b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQCloudRegionTest.java
@@ -43,11 +43,11 @@ public class AAINQCloudRegionTest {
aaiNQCloudRegion.setCloudRegionVersion("v1");
aaiNQCloudRegion.setComplexName("SharedNode");
aaiNQCloudRegion.setResourceVersion("1504789196021");
- assertNotNull(aaiNQCloudRegion);
- assertEquals(aaiNQCloudRegion.getCloudOwner(), "Rackspace");
- assertEquals(aaiNQCloudRegion.getCloudRegionId(), "DFW");
- assertEquals(aaiNQCloudRegion.getCloudRegionVersion(), "v1");
- assertEquals(aaiNQCloudRegion.getComplexName(), "SharedNode");
- assertEquals(aaiNQCloudRegion.getResourceVersion(), "1504789196021");
+ assertNotNull(aaiNQCloudRegion);
+ assertEquals("Rackspace", aaiNQCloudRegion.getCloudOwner());
+ assertEquals("DFW", aaiNQCloudRegion.getCloudRegionId());
+ assertEquals("v1", aaiNQCloudRegion.getCloudRegionVersion());
+ assertEquals("SharedNode", aaiNQCloudRegion.getComplexName());
+ assertEquals("1504789196021", aaiNQCloudRegion.getResourceVersion());
}
}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQExtraPropertyTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQExtraPropertyTest.java
index 2b6dc7452..78189c857 100644
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQExtraPropertyTest.java
+++ b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQExtraPropertyTest.java
@@ -42,7 +42,7 @@ public class AAINQExtraPropertyTest {
aaiNQExtraProperty.setPropertyValue("service-instance");
assertNotNull(aaiNQExtraProperty);
- assertEquals(aaiNQExtraProperty.getPropertyName(), "model.model-name");
- assertEquals(aaiNQExtraProperty.getPropertyValue(), "service-instance");
+ assertEquals("model.model-name", aaiNQExtraProperty.getPropertyName());
+ assertEquals("service-instance", aaiNQExtraProperty.getPropertyValue());
}
}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQGenericVNFTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQGenericVNFTest.java
index 7bd7d0270..fba01bc22 100644
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQGenericVNFTest.java
+++ b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQGenericVNFTest.java
@@ -38,42 +38,42 @@ public class AAINQGenericVNFTest {
@Test
public void test() {
AAINQGenericVNF aaiNQGenericVNF = new AAINQGenericVNF();
- aaiNQGenericVNF.setEncrypedAccessFlag(true);
- aaiNQGenericVNF.setInMaint(false);
- aaiNQGenericVNF.setIpv4Loopback0Address("aa");
- aaiNQGenericVNF.setIpv4OamAddress("oamAddress");
- aaiNQGenericVNF.setIsClosedLoopDisabled(false);
- aaiNQGenericVNF.setModelInvariantId("653d2caa-7e47-4614-95b3-26c8d82755b8");
- aaiNQGenericVNF.setModelVersionId("98f410f6-4c63-447b-97d2-42508437cec0");
+ aaiNQGenericVNF.setEncrypedAccessFlag(true);
+ aaiNQGenericVNF.setInMaint(false);
+ aaiNQGenericVNF.setIpv4Loopback0Address("aa");
+ aaiNQGenericVNF.setIpv4OamAddress("oamAddress");
+ aaiNQGenericVNF.setIsClosedLoopDisabled(false);
+ aaiNQGenericVNF.setModelInvariantId("653d2caa-7e47-4614-95b3-26c8d82755b8");
+ aaiNQGenericVNF.setModelVersionId("98f410f6-4c63-447b-97d2-42508437cec0");
aaiNQGenericVNF.setOperationalState("active");
aaiNQGenericVNF.setPersonaModelId("653d2caa-7e47-4614-95b3-26c8d82755b8");
aaiNQGenericVNF.setPersonaModelVersion("98f410f6-4c63-447b-97d2-42508437cec0");
aaiNQGenericVNF.setProvStatus("complete");
aaiNQGenericVNF.setResourceVersion("1505056714553");
aaiNQGenericVNF.setServiceId("e8cb8968-5411-478b-906a-f28747de72cd");
- aaiNQGenericVNF.setVnfID("ed8b2bce-6b27-4089-992c-4a2c66024bcd");
+ aaiNQGenericVNF.setVnfID("ed8b2bce-6b27-4089-992c-4a2c66024bcd");
aaiNQGenericVNF.setVnfName("vCPEInfraVNF14a");
aaiNQGenericVNF.setVnfName2("malumabb12");
aaiNQGenericVNF.setVnfType("vCPEInfraService10/vCPEInfraService10 0");
- assertNotNull(aaiNQGenericVNF);
-
- assertEquals(aaiNQGenericVNF.getEncrypedAccessFlag(), true);
- assertEquals(aaiNQGenericVNF.getInMaint(), false);
- assertEquals(aaiNQGenericVNF.getIpv4Loopback0Address(), "aa");
- assertEquals(aaiNQGenericVNF.getIpv4OamAddress(), "oamAddress");
- assertEquals(aaiNQGenericVNF.getIsClosedLoopDisabled(), false);
- assertEquals(aaiNQGenericVNF.getModelInvariantId(), "653d2caa-7e47-4614-95b3-26c8d82755b8");
- assertEquals(aaiNQGenericVNF.getModelVersionId(), "98f410f6-4c63-447b-97d2-42508437cec0");
- assertEquals(aaiNQGenericVNF.getOperationalState(), "active");
- assertEquals(aaiNQGenericVNF.getPersonaModelId(), "653d2caa-7e47-4614-95b3-26c8d82755b8");
- assertEquals(aaiNQGenericVNF.getPersonaModelVersion(), "98f410f6-4c63-447b-97d2-42508437cec0");
- assertEquals(aaiNQGenericVNF.getProvStatus(), "complete");
- assertEquals(aaiNQGenericVNF.getResourceVersion(), "1505056714553");
- assertEquals(aaiNQGenericVNF.getServiceId(), "e8cb8968-5411-478b-906a-f28747de72cd");
- assertEquals(aaiNQGenericVNF.getVnfID(), "ed8b2bce-6b27-4089-992c-4a2c66024bcd");
- assertEquals(aaiNQGenericVNF.getVnfName(), "vCPEInfraVNF14a");
- assertEquals(aaiNQGenericVNF.getVnfName2(), "malumabb12");
- assertEquals(aaiNQGenericVNF.getVnfType(), "vCPEInfraService10/vCPEInfraService10 0");
+ assertNotNull(aaiNQGenericVNF);
+
+ assertEquals(true, aaiNQGenericVNF.getEncrypedAccessFlag());
+ assertEquals(false, aaiNQGenericVNF.getInMaint());
+ assertEquals("aa", aaiNQGenericVNF.getIpv4Loopback0Address());
+ assertEquals("oamAddress", aaiNQGenericVNF.getIpv4OamAddress());
+ assertEquals(false, aaiNQGenericVNF.getIsClosedLoopDisabled());
+ assertEquals("653d2caa-7e47-4614-95b3-26c8d82755b8", aaiNQGenericVNF.getModelInvariantId());
+ assertEquals("98f410f6-4c63-447b-97d2-42508437cec0", aaiNQGenericVNF.getModelVersionId());
+ assertEquals("active", aaiNQGenericVNF.getOperationalState());
+ assertEquals("653d2caa-7e47-4614-95b3-26c8d82755b8", aaiNQGenericVNF.getPersonaModelId());
+ assertEquals("98f410f6-4c63-447b-97d2-42508437cec0", aaiNQGenericVNF.getPersonaModelVersion());
+ assertEquals("complete", aaiNQGenericVNF.getProvStatus());
+ assertEquals("1505056714553", aaiNQGenericVNF.getResourceVersion());
+ assertEquals("e8cb8968-5411-478b-906a-f28747de72cd", aaiNQGenericVNF.getServiceId());
+ assertEquals("ed8b2bce-6b27-4089-992c-4a2c66024bcd", aaiNQGenericVNF.getVnfID());
+ assertEquals("vCPEInfraVNF14a", aaiNQGenericVNF.getVnfName());
+ assertEquals("malumabb12", aaiNQGenericVNF.getVnfName2());
+ assertEquals("vCPEInfraService10/vCPEInfraService10 0", aaiNQGenericVNF.getVnfType());
}
}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQInventoryResponseItemsTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQInventoryResponseItemsTest.java
index 422824330..caeec7910 100644
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQInventoryResponseItemsTest.java
+++ b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQInventoryResponseItemsTest.java
@@ -46,7 +46,7 @@ public class AAINQInventoryResponseItemsTest {
AAINQInventoryResponseItems aaiNQInventoryResponseItems = new AAINQInventoryResponseItems();
AAINQInventoryResponseItem serviceItem = new AAINQInventoryResponseItem();
serviceItem.setModelName("service-instance");
- assertEquals(serviceItem.getModelName(), "service-instance");
+ assertEquals("service-instance", serviceItem.getModelName());
serviceItem.setServiceInstance(new AAINQServiceInstance());
serviceItem.getServiceInstance().setServiceInstanceID("dhv-test-vhnfportal-service-instance-id");
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQServiceInstanceTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQServiceInstanceTest.java
index dcb19a4ef..3b3d13c1e 100644
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQServiceInstanceTest.java
+++ b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQServiceInstanceTest.java
@@ -51,14 +51,14 @@ public class AAINQServiceInstanceTest {
aaiNQServiceInstance.setModelInvariantId("SomeID");
aaiNQServiceInstance.setModelVersionId("SomeVersion");
assertNotNull(aaiNQServiceInstance);
- assertEquals(aaiNQServiceInstance.getServiceInstanceID(), "dhv-test-vhnfportal-service-instance-id");
- assertEquals(aaiNQServiceInstance.getServiceInstanceName(), "dhv-test-service-instance-name1");
- assertEquals(aaiNQServiceInstance.getPersonaModelId(), "82194af1-3c2c-485a-8f44-420e22a9eaa4");
- assertEquals(aaiNQServiceInstance.getPersonaModelVersion(), "1.0");
- assertEquals(aaiNQServiceInstance.getServiceInstanceLocationId(), "dhv-test-service-instance-location-id1");
- assertEquals(aaiNQServiceInstance.getResourceVersion(), "1485366092");
- assertEquals(aaiNQServiceInstance.getModelInvariantId(), "SomeID");
- assertEquals(aaiNQServiceInstance.getModelVersionId(), "SomeVersion");
+ assertEquals("dhv-test-vhnfportal-service-instance-id", aaiNQServiceInstance.getServiceInstanceID());
+ assertEquals("dhv-test-service-instance-name1", aaiNQServiceInstance.getServiceInstanceName());
+ assertEquals("82194af1-3c2c-485a-8f44-420e22a9eaa4", aaiNQServiceInstance.getPersonaModelId());
+ assertEquals("1.0", aaiNQServiceInstance.getPersonaModelVersion());
+ assertEquals("dhv-test-service-instance-location-id1", aaiNQServiceInstance.getServiceInstanceLocationId());
+ assertEquals("1485366092", aaiNQServiceInstance.getResourceVersion());
+ assertEquals("SomeID", aaiNQServiceInstance.getModelInvariantId());
+ assertEquals("SomeVersion", aaiNQServiceInstance.getModelVersionId());
logger.info(Serialization.gsonPretty.toJson(aaiNQServiceInstance));
}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQTenantTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQTenantTest.java
index c40a46246..b696c7bd4 100644
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQTenantTest.java
+++ b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQTenantTest.java
@@ -46,9 +46,9 @@ public class AAINQTenantTest {
aaiNQTenant.setTenantName("dhv-test-tenant-name");
aaiNQTenant.setResourceVersion("1485366334");
assertNotNull(aaiNQTenant);
- assertEquals(aaiNQTenant.getTenantId(), "dhv-test-tenant");
- assertEquals(aaiNQTenant.getTenantName(), "dhv-test-tenant-name");
- assertEquals(aaiNQTenant.getResourceVersion(), "1485366334");
+ assertEquals("dhv-test-tenant", aaiNQTenant.getTenantId());
+ assertEquals("dhv-test-tenant-name", aaiNQTenant.getTenantName());
+ assertEquals("1485366334", aaiNQTenant.getResourceVersion());
logger.info(Serialization.gsonPretty.toJson(aaiNQTenant));
}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQVServerTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQVServerTest.java
index b928e86a6..556d82c2e 100644
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQVServerTest.java
+++ b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQVServerTest.java
@@ -52,14 +52,14 @@ public class AAINQVServerTest {
aaiNQVServer.setIsClosedLoopDisabled(false);
aaiNQVServer.setResourceVersion("1485366417");
assertNotNull(aaiNQVServer);
- assertEquals(aaiNQVServer.getVserverId(), "dhv-test-vserver");
- assertEquals(aaiNQVServer.getVserverName(), "dhv-test-vserver-name");
- assertEquals(aaiNQVServer.getVserverName2(), "dhv-test-vserver-name2");
- assertEquals(aaiNQVServer.getProvStatus(), "PREPROV");
- assertEquals(aaiNQVServer.getVserverSelflink(), "dhv-test-vserver-selflink");
- assertEquals(aaiNQVServer.getInMaint(), false);
- assertEquals(aaiNQVServer.getIsClosedLoopDisabled(), false);
- assertEquals(aaiNQVServer.getResourceVersion(), "1485366417");
+ assertEquals("dhv-test-vserver", aaiNQVServer.getVserverId());
+ assertEquals("dhv-test-vserver-name", aaiNQVServer.getVserverName());
+ assertEquals("dhv-test-vserver-name2", aaiNQVServer.getVserverName2());
+ assertEquals("PREPROV", aaiNQVServer.getProvStatus());
+ assertEquals("dhv-test-vserver-selflink", aaiNQVServer.getVserverSelflink());
+ assertEquals(false, aaiNQVServer.getInMaint());
+ assertEquals(false, aaiNQVServer.getIsClosedLoopDisabled());
+ assertEquals("1485366417", aaiNQVServer.getResourceVersion());
logger.info(Serialization.gsonPretty.toJson(aaiNQVServer));
}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQVfModuleTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQVfModuleTest.java
index 21f13d5e8..7595f88cd 100644
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQVfModuleTest.java
+++ b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQVfModuleTest.java
@@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
-*/
+ */
package org.onap.policy.aai;
import static org.junit.Assert.*;
@@ -56,21 +56,21 @@ public class AAINQVfModuleTest {
aaiNQVfModule.setContrailServiceInstanceFqdn("example-contrail-service-instance-fqdn-val-86796");
aaiNQVfModule.setModelInvariantId("SomeId");
aaiNQVfModule.setModelVersionId("SomeVersion");
- assertNotNull(aaiNQVfModule);
- assertEquals(aaiNQVfModule.getVfModuleId(), "example-vf-module-id-val-49261");
- assertEquals(aaiNQVfModule.getVfModuleName(), "example-vf-module-name-val-73074");
- assertEquals(aaiNQVfModule.getHeatStackId(), "example-heat-stack-id-val-86300");
- assertEquals(aaiNQVfModule.getOrchestrationStatus(), "example-orchestration-status-val-56523");
- assertEquals(aaiNQVfModule.getIsBaseVfModule(), true);
- assertEquals(aaiNQVfModule.getResourceVersion(), "1485366450");
- assertEquals(aaiNQVfModule.getPersonaModelId(), "ef86f9c5-2165-44f3-8fc3-96018b609ea5");
- assertEquals(aaiNQVfModule.getPersonaModelVersion(), "1.0");
- assertEquals(aaiNQVfModule.getWidgetModelId(), "example-widget-model-id-val-92571");
- assertEquals(aaiNQVfModule.getWidgetModelVersion(), "example-widget-model-version-val-83317");
- assertEquals(aaiNQVfModule.getContrailServiceInstanceFqdn(), "example-contrail-service-instance-fqdn-val-86796");
- assertEquals(aaiNQVfModule.getModelInvariantId(), "SomeId");
- assertEquals(aaiNQVfModule.getModelVersionId(), "SomeVersion");
- logger.info(Serialization.gsonPretty.toJson(aaiNQVfModule));
+ assertNotNull(aaiNQVfModule);
+ assertEquals("example-vf-module-id-val-49261", aaiNQVfModule.getVfModuleId());
+ assertEquals("example-vf-module-name-val-73074", aaiNQVfModule.getVfModuleName());
+ assertEquals("example-heat-stack-id-val-86300", aaiNQVfModule.getHeatStackId());
+ assertEquals("example-orchestration-status-val-56523", aaiNQVfModule.getOrchestrationStatus());
+ assertEquals(true, aaiNQVfModule.getIsBaseVfModule());
+ assertEquals("1485366450", aaiNQVfModule.getResourceVersion());
+ assertEquals("ef86f9c5-2165-44f3-8fc3-96018b609ea5", aaiNQVfModule.getPersonaModelId());
+ assertEquals("1.0", aaiNQVfModule.getPersonaModelVersion());
+ assertEquals("example-widget-model-id-val-92571", aaiNQVfModule.getWidgetModelId());
+ assertEquals("example-widget-model-version-val-83317", aaiNQVfModule.getWidgetModelVersion());
+ assertEquals("example-contrail-service-instance-fqdn-val-86796", aaiNQVfModule.getContrailServiceInstanceFqdn());
+ assertEquals("SomeId", aaiNQVfModule.getModelInvariantId());
+ assertEquals("SomeVersion", aaiNQVfModule.getModelVersionId());
+ logger.info(Serialization.gsonPretty.toJson(aaiNQVfModule));
}
}
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/PNFInstanceTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/PNFInstanceTest.java
index a280f546c..b4a8a51eb 100644
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/PNFInstanceTest.java
+++ b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/PNFInstanceTest.java
@@ -47,7 +47,7 @@ public class PNFInstanceTest {
pnfInstance.setPNFType(PNFType.ENODEB);
pnfInstance.setPNFSerial("pnf-serial-test");
assertNotNull(pnfInstance);
- assertEquals(pnfInstance.getPNFInstanceName(), "pnf-instance-name-test");
+ assertEquals("pnf-instance-name-test", pnfInstance.getPNFInstanceName());
PNFInstance pnfInstanceNull = new PNFInstance(null);
assertNotNull(pnfInstanceNull);
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipDataTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipDataTest.java
index b25d3e473..6b228f7a0 100644
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipDataTest.java
+++ b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipDataTest.java
@@ -46,8 +46,8 @@ public class RelationshipDataTest {
relationshipDataItem.setRelationshipKey("relationship-key");
relationshipDataItem.setRelationshipValue("relationship-value");
assertNotNull(relationshipDataItem);
- assertEquals(relationshipDataItem.getRelationshipKey(), "relationship-key");
- assertEquals(relationshipDataItem.getRelationshipValue(), "relationship-value");
+ assertEquals("relationship-key", relationshipDataItem.getRelationshipKey());
+ assertEquals("relationship-value", relationshipDataItem.getRelationshipValue());
relationshipData.getRelationshipData().add(relationshipDataItem);
RelationshipDataItem relationshipDataItem2 = new RelationshipDataItem();
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipListTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipListTest.java
index a5a7d90d0..7300fb87c 100644
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipListTest.java
+++ b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipListTest.java
@@ -42,28 +42,28 @@ public class RelationshipListTest {
@Test
public void test() {
RelationshipList relationshipList = new RelationshipList();
- Relationship relationship = new Relationship();
- relationship.setRelatedLink("related-link");
- relationship.setRelatedTo("related-to");
- assertEquals(relationship.getRelatedLink(), "related-link");
- assertEquals(relationship.getRelatedTo(), "related-to");
+ Relationship relationship = new Relationship();
+ relationship.setRelatedLink("related-link");
+ relationship.setRelatedTo("related-to");
+ assertEquals("related-link", relationship.getRelatedLink());
+ assertEquals("related-to", relationship.getRelatedTo());
RelatedToProperty relatedToProperty = new RelatedToProperty();
- RelatedToPropertyItem relatedToPropertyItem = new RelatedToPropertyItem();
- relatedToPropertyItem.setPropertyKey("model.model-name");
+ RelatedToPropertyItem relatedToPropertyItem = new RelatedToPropertyItem();
+ relatedToPropertyItem.setPropertyKey("model.model-name");
relatedToPropertyItem.setPropertyValue("service-instance");
- relatedToProperty.getRelatedTo().add(relatedToPropertyItem);
- RelatedToPropertyItem relatedToPropertyItem2 = new RelatedToPropertyItem();
- relatedToPropertyItem2.setPropertyKey("model.model-name2");
+ relatedToProperty.getRelatedTo().add(relatedToPropertyItem);
+ RelatedToPropertyItem relatedToPropertyItem2 = new RelatedToPropertyItem();
+ relatedToPropertyItem2.setPropertyKey("model.model-name2");
relatedToPropertyItem2.setPropertyValue("service-instance2");
relatedToProperty.getRelatedTo().add(relatedToPropertyItem2);
- relationship.setRelatedToProperty(relatedToProperty);
- RelationshipDataItem relationshipDataItem = new RelationshipDataItem();
+ relationship.setRelatedToProperty(relatedToProperty);
+ RelationshipDataItem relationshipDataItem = new RelationshipDataItem();
relationshipDataItem.setRelationshipKey("relationship-key");
- relationshipDataItem.setRelationshipValue("relationship-value");
- RelationshipData relationshipData = new RelationshipData();
- relationshipData.getRelationshipData().add(relationshipDataItem);
- relationship.setRelationshipData(relationshipData);
+ relationshipDataItem.setRelationshipValue("relationship-value");
+ RelationshipData relationshipData = new RelationshipData();
+ relationshipData.getRelationshipData().add(relationshipDataItem);
+ relationship.setRelationshipData(relationshipData);
relationshipList.getRelationshipList().add(relationship);
assertNotNull(relationshipList);
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipTest.java
index 3f899eb9b..81ba0885c 100644
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipTest.java
+++ b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/RelationshipTest.java
@@ -42,30 +42,30 @@ public class RelationshipTest {
@Test
public void test() {
Relationship relationship = new Relationship();
- relationship.setRelatedLink("related-link");
- relationship.setRelatedTo("related-to");
- assertEquals(relationship.getRelatedLink(), "related-link");
- assertEquals(relationship.getRelatedTo(), "related-to");
+ relationship.setRelatedLink("related-link");
+ relationship.setRelatedTo("related-to");
+ assertEquals("related-link", relationship.getRelatedLink());
+ assertEquals("related-to", relationship.getRelatedTo());
RelatedToProperty relatedToProperty = new RelatedToProperty();
- RelatedToPropertyItem relatedToPropertyItem = new RelatedToPropertyItem();
- relatedToPropertyItem.setPropertyKey("model.model-name");
+ RelatedToPropertyItem relatedToPropertyItem = new RelatedToPropertyItem();
+ relatedToPropertyItem.setPropertyKey("model.model-name");
relatedToPropertyItem.setPropertyValue("service-instance");
- relatedToProperty.getRelatedTo().add(relatedToPropertyItem);
- RelatedToPropertyItem relatedToPropertyItem2 = new RelatedToPropertyItem();
- relatedToPropertyItem2.setPropertyKey("model.model-name2");
+ relatedToProperty.getRelatedTo().add(relatedToPropertyItem);
+ RelatedToPropertyItem relatedToPropertyItem2 = new RelatedToPropertyItem();
+ relatedToPropertyItem2.setPropertyKey("model.model-name2");
relatedToPropertyItem2.setPropertyValue("service-instance2");
relatedToProperty.getRelatedTo().add(relatedToPropertyItem2);
- relationship.setRelatedToProperty(relatedToProperty);
- assertEquals(relationship.getRelatedToProperty(), relatedToProperty);
- RelationshipDataItem relationshipDataItem = new RelationshipDataItem();
+ relationship.setRelatedToProperty(relatedToProperty);
+ assertEquals(relationship.getRelatedToProperty(), relatedToProperty);
+ RelationshipDataItem relationshipDataItem = new RelationshipDataItem();
relationshipDataItem.setRelationshipKey("relationship-key");
- relationshipDataItem.setRelationshipValue("relationship-value");
- RelationshipData relationshipData = new RelationshipData();
- relationshipData.getRelationshipData().add(relationshipDataItem);
- relationship.setRelationshipData(relationshipData);
- assertEquals(relationship.getRelationshipData(), relationshipData);
- assertNotNull(relationship);
+ relationshipDataItem.setRelationshipValue("relationship-value");
+ RelationshipData relationshipData = new RelationshipData();
+ relationshipData.getRelationshipData().add(relationshipDataItem);
+ relationship.setRelationshipData(relationshipData);
+ assertEquals(relationship.getRelationshipData(), relationshipData);
+ assertNotNull(relationship);
logger.info(Serialization.gsonPretty.toJson(relationship));
}