diff options
author | 2020-09-21 11:38:23 -0400 | |
---|---|---|
committer | 2020-09-23 16:32:42 -0400 | |
commit | 2505a543b0e45c1c3c2fe2fb8b85664b08bf2fca (patch) | |
tree | 5f1593d45f8c9a2fb2d400b8fa58dbb3e29ef671 /graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIObjectTypeTest.java | |
parent | 8d68a316f303d0fc57eb7da4fef881a26d39d439 (diff) |
removed references to AAIObjectType
removed references to AAIObjectType and AAIObjectPlurals
additional corrections for removal of aai object type
corrected additional java files
updated groovy files to match aai fluent builder style
Issue-ID: SO-3259
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: Ifdf12fcacb34cc648548eb18b638afd06dad67a9
Diffstat (limited to 'graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIObjectTypeTest.java')
-rw-r--r-- | graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIObjectTypeTest.java | 59 |
1 files changed, 7 insertions, 52 deletions
diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIObjectTypeTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIObjectTypeTest.java index 000521bdf6..12051fb07d 100644 --- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIObjectTypeTest.java +++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIObjectTypeTest.java @@ -22,16 +22,15 @@ package org.onap.aaiclient.client.aai; import static org.junit.Assert.assertEquals; import org.junit.Test; -import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri; -import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory; import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder; +import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types; public class AAIObjectTypeTest { @Test public void fromTypeNameTest() throws IllegalArgumentException, IllegalAccessException, InstantiationException { - AAIObjectType type = AAIObjectType.fromTypeName("allotted-resource"); - assertEquals("allotted-resource", type.typeName()); + AAIObjectType type = AAIObjectType.fromTypeName("generic-query"); + assertEquals("generic-query", type.typeName()); } @@ -43,58 +42,14 @@ public class AAIObjectTypeTest { } @Test - public void verifyDefaultCase() { - assertEquals("default removed for tenant", "tenant", AAIObjectType.DEFAULT_TENANT.typeName()); - assertEquals("default removed for cloud-region", "cloud-region", AAIObjectType.DEFAULT_CLOUD_REGION.typeName()); - } - - @Test - public void verifyRegularCase() { - assertEquals("default removed for tenant", "allotted-resource", AAIObjectType.ALLOTTED_RESOURCE.typeName()); - } - - @Test - public void instanceGroupObjectTypeTest() { - final String id = "test1"; - AAIResourceUri aaiUri = AAIUriFactory.createResourceUri(AAIObjectType.INSTANCE_GROUP, id); - assertEquals("/network/instance-groups/instance-group/test1", aaiUri.build().toString()); - } - - @Test - public void collectionObjectTypeTest() { - final String id = "test1"; - AAIResourceUri aaiUri = AAIUriFactory.createResourceUri(AAIObjectType.COLLECTION, id); - assertEquals("/network/collections/collection/test1", aaiUri.build().toString()); - } - - @Test - public void genericVnfTest() { - AAIObjectType type = AAIObjectType.GENERIC_VNF; - assertEquals("/network/generic-vnfs/generic-vnf/{vnf-id}", type.uriTemplate()); - assertEquals("/generic-vnfs/generic-vnf/{vnf-id}", type.partialUri()); - } - - @Test - public void pInterfaceTest() { - AAIObjectType type = AAIObjectType.P_INTERFACE; - assertEquals("/cloud-infrastructure/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name}", - type.uriTemplate()); - assertEquals("/p-interfaces/p-interface/{interface-name}", type.partialUri()); - } - - @Test - public void networkPolicyObjectTypeTest() { - final String id = "test1"; - AAIResourceUri aaiUri = AAIUriFactory.createResourceUri(AAIObjectType.NETWORK_POLICY, id); - assertEquals("/network/network-policies/network-policy/test1", aaiUri.build().toString()); - } - - @Test public void equalityTest() { AAIObjectType genericVnf = AAIFluentTypeBuilder.network().genericVnf("test").build(); + AAIObjectType genericVnf2 = AAIFluentTypeBuilder.network().genericVnf("test2").build(); + + assertEquals(genericVnf2, genericVnf); - assertEquals(AAIObjectType.GENERIC_VNF, genericVnf); + assertEquals(genericVnf, Types.GENERIC_VNF); } |