summaryrefslogtreecommitdiffstats
path: root/aai-core/src/test/java/org/openecomp/aai/parsers/relationship/RelationshipToURITest.java
diff options
context:
space:
mode:
Diffstat (limited to 'aai-core/src/test/java/org/openecomp/aai/parsers/relationship/RelationshipToURITest.java')
-rw-r--r--aai-core/src/test/java/org/openecomp/aai/parsers/relationship/RelationshipToURITest.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/aai-core/src/test/java/org/openecomp/aai/parsers/relationship/RelationshipToURITest.java b/aai-core/src/test/java/org/openecomp/aai/parsers/relationship/RelationshipToURITest.java
index bc20af11..092d5c66 100644
--- a/aai-core/src/test/java/org/openecomp/aai/parsers/relationship/RelationshipToURITest.java
+++ b/aai-core/src/test/java/org/openecomp/aai/parsers/relationship/RelationshipToURITest.java
@@ -84,8 +84,6 @@ public class RelationshipToURITest extends AAISetup {
thrown.expect(AAIIdentityMapParseException.class);
thrown.expect(hasProperty("code", is("AAI_3000")));
RelationshipToURI parse = new RelationshipToURI(loader, obj);
-
-
URI uri = parse.getUri();
}
@@ -97,8 +95,6 @@ public class RelationshipToURITest extends AAISetup {
URI expected = new URI("/network/test-objects/test-object/key2");
RelationshipToURI parse = new RelationshipToURI(loader, obj);
-
-
URI uri = parse.getUri();
assertEquals("related-link is equal", expected, uri);
@@ -122,6 +118,20 @@ public class RelationshipToURITest extends AAISetup {
}
@Test
+ public void failNothingToParse() throws AAIException, URISyntaxException, IOException {
+ Loader loader = LoaderFactory.createLoaderForVersion(modelType, version10);
+ Introspector obj = loader.unmarshal("relationship", this.getJsonString("nothing-to-parse.json"));
+ URI expected = new URI("/aai/v10/network/test-objects/test-object/key1");
+
+ thrown.expect(AAIIdentityMapParseException.class);
+ thrown.expect(hasProperty("code", is("AAI_3000")));
+ RelationshipToURI parse = new RelationshipToURI(loader, obj);
+
+ URI uri = parse.getUri();
+
+ }
+
+ @Test
public void successV10() throws AAIException, URISyntaxException, IOException {
Loader loader = LoaderFactory.createLoaderForVersion(modelType, version10);
Introspector obj = loader.unmarshal("relationship", this.getJsonString("both-successv10-failv9.json"));