diff options
Diffstat (limited to 'champ-lib/champ-core/src/test/java/org/onap/aai/champcore/ie/ImportTest.java')
-rw-r--r-- | champ-lib/champ-core/src/test/java/org/onap/aai/champcore/ie/ImportTest.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/champ-lib/champ-core/src/test/java/org/onap/aai/champcore/ie/ImportTest.java b/champ-lib/champ-core/src/test/java/org/onap/aai/champcore/ie/ImportTest.java index 858c377..756d4ca 100644 --- a/champ-lib/champ-core/src/test/java/org/onap/aai/champcore/ie/ImportTest.java +++ b/champ-lib/champ-core/src/test/java/org/onap/aai/champcore/ie/ImportTest.java @@ -90,4 +90,22 @@ public class ImportTest { api.shutdown(); } + + @Test + public void testUndefinedEdgeSourceAndTarget() throws ChampTransactionException, AssertionError { + + final GraphMLImporterExporter importer = new GraphMLImporterExporter(); + final ChampAPI api = ChampAPI.Factory.newInstance("IN_MEMORY"); + + importer.importData(api, getClass().getClassLoader().getResourceAsStream("import-test2.graphml")); + + final ChampGraph graph = api.getGraph(GRAPH_NAME); + + graph.queryObjects(Collections.emptyMap(), Optional.empty()).forEach(object -> { + final Optional<String> nameOpt = object.getProperty("name"); + assertTrue(!nameOpt.isPresent()); + }); + + api.shutdown(); + } } |