diff options
author | Benjamin, Max <max.benjamin@att.com> | 2020-09-10 11:15:57 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@att.com> | 2020-09-10 11:15:57 -0400 |
commit | f687d9f4ae7500556d78fff1b5dd461412440e01 (patch) | |
tree | d9da3e2f613886b855fe953422764ca82a2ff883 /graph-inventory/aai-client/src/test/java/org/onap/aaiclient | |
parent | a714a448501d30fee850f878e85023db72b71f14 (diff) |
added fragment support to generated objects
added fragment support to generated objects
updated objects to support singular and plural fragments
Issue-ID: SO-3240
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: Ia010c99ad36422db5f5b3729af3991767fe5138f
Diffstat (limited to 'graph-inventory/aai-client/src/test/java/org/onap/aaiclient')
-rw-r--r-- | graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriTest.java | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriTest.java b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriTest.java index f8dd1726d3..92e74163a7 100644 --- a/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriTest.java +++ b/graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriTest.java @@ -32,6 +32,7 @@ import org.junit.Test; import org.onap.aaiclient.client.aai.AAIObjectPlurals; import org.onap.aaiclient.client.aai.AAIObjectType; import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder; +import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types; import org.onap.aaiclient.client.graphinventory.entities.uri.Depth; public class AAISimpleUriTest { @@ -43,7 +44,14 @@ public class AAISimpleUriTest { AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test1").relatedTo(AAIObjectPlurals.PSERVER); String uriOutput = uri.build().toString(); - assertEquals("/network/generic-vnfs/generic-vnf/test1/related-to/pservers", uriOutput); + + String expected = "/network/generic-vnfs/generic-vnf/test1/related-to/pservers"; + assertEquals(expected, uriOutput); + + uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test1") + .relatedTo(Types.PSERVERS.getFragment()); + uriOutput = uri.build().toString(); + assertEquals(expected, uriOutput); } @Test @@ -51,7 +59,17 @@ public class AAISimpleUriTest { AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test1") .relatedTo(AAIObjectType.PSERVER, "test2"); String uriOutput = uri.build().toString(); - assertEquals("/network/generic-vnfs/generic-vnf/test1/related-to/pservers/pserver/test2", uriOutput); + + String expected = "/network/generic-vnfs/generic-vnf/test1/related-to/pservers/pserver/test2"; + assertEquals(expected, uriOutput); + + uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test1") + .relatedTo(Types.PSERVER.getFragment("test2")); + + uriOutput = uri.build().toString(); + + assertEquals(expected, uriOutput); + } @Test |