* ============LICENSE_END============================================
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.onap.aai.champ.core;
+package org.onap.aai.champcore.core;
import static org.junit.Assert.assertTrue;
import java.util.stream.Stream;
import org.junit.Test;
-import org.onap.aai.champ.ChampAPI;
-import org.onap.aai.champ.ChampGraph;
-import org.onap.aai.champ.exceptions.ChampIndexNotExistsException;
-import org.onap.aai.champ.model.ChampObjectIndex;
+import org.onap.aai.champcore.ChampAPI;
+import org.onap.aai.champcore.ChampGraph;
+import org.onap.aai.champcore.exceptions.ChampIndexNotExistsException;
+import org.onap.aai.champcore.model.ChampObjectIndex;
public class ChampObjectIndexTest extends BaseChampAPITest {
@Test
- public void runTest() {
- for (ChampGraph.Type apiType : ChampGraph.Type.values()) {
+ public void runTestMemory() {
+ runTest("IN_MEMORY");
+ }
+
+ public void runTest(String apiType) {
final ChampAPI api = ChampAPI.Factory.newInstance(apiType);
final String graphName = api.getClass().getSimpleName();
- switch (apiType) {
- case IN_MEMORY:
- break;
- case TITAN:
- cleanUp(graphName);
- break;
- default:
- break;
- }
-
ChampObjectIndexTest.testChampObjectIndexCrud(api.getGraph(graphName));
api.shutdown();
- }
}
- private static void testChampObjectIndexCrud(ChampGraph graph) {
+ public static void testChampObjectIndexCrud(ChampGraph graph) {
final ChampObjectIndex objectIndex = ChampObjectIndex.create()
.ofName("fooObjectIndex")