Skip to content

Instantly share code, notes, and snippets.

@okram
Created Nov 9, 2011
Embed
What would you like to do?
package com.cisco.hmp.graph.sharesav;
import com.cisco.hmp.graph.BaseTest;
import com.cisco.hmp.graph.schema.graph.SchemaGraph;
import com.cisco.hmp.graph.schema.graph.util.TransactionalTinkerGraph;
import java.io.IOException;
import java.util.Iterator;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
*/
public class ShareSavTraversalTest extends BaseTest {
private static SchemaGraph graph;
static {
try {
graph = ShareSavParser.generateShareSavGraph(new TransactionalTinkerGraph());
} catch (IOException e) {
}
}
public void testNotNull() {
assertNotNull(ShareSavSchema.generateSchema());
}
public void testQuery1() {
ShareSavTraversals sst = new ShareSavTraversals(graph);
Iterator<Long> itty = sst.evaluateQuery("Marco Sena", "HOSPITAL NACIONAL", 1222844400000l, 1223103600000l);
assertFalse(itty.hasNext());
}
public void testQuery2() {
ShareSavTraversals sst = new ShareSavTraversals(graph);
Iterator<Long> itty = sst.evaluateQuery2(1275l, 0, -1l, -1l);
assertTrue(itty.hasNext());
}
public void testQuery3() {
ShareSavTraversals sst = new ShareSavTraversals(graph);
//Iterator<Long> itty = sst.evaluateQuery3(121372l, 0, -1l, -1l);
//assertTrue(itty.hasNext());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment