use of net.fortytwo.sesametools.StatementComparator in project blueprints by tinkerpop.
the class PropertyGraphSailTest method assertExpected.
private void assertExpected(final Collection<Statement> graph, final Statement... expectedStatements) throws Exception {
Set<Statement> expected = new TreeSet<Statement>(new StatementComparator());
for (Statement st : expectedStatements) {
expected.add(st);
}
Set<Statement> actual = new TreeSet<Statement>(new StatementComparator());
for (Statement st : graph) {
actual.add(st);
}
for (Statement t : expected) {
if (!actual.contains(t)) {
fail("expected statement not found: " + t);
}
}
for (Statement t : actual) {
if (!expected.contains(t)) {
fail("unexpected statement found: " + t);
}
}
}
Aggregations