X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=champ-lib%2Fchamp-core%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Faai%2Fchampcore%2Fie%2FImportTest.java;fp=src%2Ftest%2Fjava%2Forg%2Fonap%2Faai%2Fchamp%2Fie%2FImportTest.java;h=67fdb19091a725d0b22111a73494f1af9cb45810;hb=c74f7b13b573386e70c10721fc391624ee792ed6;hp=0dca95e8c27d78084c839f702e7ebfca4c463e91;hpb=9fc28cff11a4b570618c0f533ce9de6209a5dd0c;p=aai%2Fchamp.git diff --git a/src/test/java/org/onap/aai/champ/ie/ImportTest.java b/champ-lib/champ-core/src/test/java/org/onap/aai/champcore/ie/ImportTest.java similarity index 88% rename from src/test/java/org/onap/aai/champ/ie/ImportTest.java rename to champ-lib/champ-core/src/test/java/org/onap/aai/champcore/ie/ImportTest.java index 0dca95e..67fdb19 100644 --- a/src/test/java/org/onap/aai/champ/ie/ImportTest.java +++ b/champ-lib/champ-core/src/test/java/org/onap/aai/champcore/ie/ImportTest.java @@ -19,7 +19,7 @@ * ============LICENSE_END============================================ * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -package org.onap.aai.champ.ie; +package org.onap.aai.champcore.ie; import static org.junit.Assert.assertTrue; @@ -27,25 +27,25 @@ import java.util.Collections; import java.util.Optional; import org.junit.Test; -import org.onap.aai.champ.ChampAPI; -import org.onap.aai.champ.ChampGraph; -import org.onap.aai.champ.ie.GraphMLImporterExporter; +import org.onap.aai.champcore.ChampAPI; +import org.onap.aai.champcore.ChampGraph; +import org.onap.aai.champcore.exceptions.ChampTransactionException; public class ImportTest { private final String GRAPH_NAME = "unit-test"; @Test - public void testGraphMLImport() { + public void testGraphMLImport() throws ChampTransactionException, AssertionError { final GraphMLImporterExporter importer = new GraphMLImporterExporter(); - final ChampAPI api = ChampAPI.Factory.newInstance(ChampGraph.Type.IN_MEMORY); + final ChampAPI api = ChampAPI.Factory.newInstance("IN_MEMORY"); importer.importData(api, getClass().getClassLoader().getResourceAsStream("import-test.graphml")); final ChampGraph graph = api.getGraph(GRAPH_NAME); - graph.queryObjects(Collections.emptyMap()).forEach(object -> { + graph.queryObjects(Collections.emptyMap(), Optional.empty()).forEach(object -> { final Optional nameOpt = object.getProperty("name"); final Optional studentOpt = object.getProperty("student"); final Optional worthOpt = object.getProperty("worth");