Skip to content

Instantly share code, notes, and snippets.

@okram
Created November 9, 2011 22:32
Show Gist options
  • Save okram/1353357 to your computer and use it in GitHub Desktop.
Save okram/1353357 to your computer and use it in GitHub Desktop.
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