@Override public boolean equals(Object o) { if (this == o) { return true; } if (o instanceof Model) { Model model = (Model) o; return ModelUtil.equals(this, model); } return false; }
/** * Compares two models, defined by two statement collections, and returns * <tt>true</tt> if they are equal. Models are equal if they contain the same * set of statements. Blank node IDs are not relevant for model equality, * they are mapped from one model to the other by using the attached * properties. */ public static boolean equals(Iterable<? extends Statement> model1, Iterable<? extends Statement> model2) { // Filter duplicates Set<Statement> set1 = new LinkedHashSet<Statement>(); Iterators.addAll(model1.iterator(), set1); Set<Statement> set2 = new LinkedHashSet<Statement>(); Iterators.addAll(model2.iterator(), set2); return equals(set1, set2); }
/** * Compares two models, defined by two statement collections, and returns * <tt>true</tt> if they are equal. Models are equal if they contain the * same set of statements. Blank node IDs are not relevant for model * equality, they are mapped from one model to the other by using the * attached properties. */ public static boolean equals(Iterable<? extends Statement> model1, Iterable<? extends Statement> model2) { // Filter duplicates Set<Statement> set1 = new LinkedHashSet<Statement>(); Iterators.addAll(model1.iterator(), set1); Set<Statement> set2 = new LinkedHashSet<Statement>(); Iterators.addAll(model2.iterator(), set2); return equals(set1, set2); }
public static boolean equals(GraphResult result1, GraphResult result2) throws StoreException { Set<? extends Statement> graph1 = result1.asSet(); Set<? extends Statement> graph2 = result1.asSet(); return ModelUtil.equals(graph1, graph2); }
protected void compareGraphs(Iterable<? extends Statement> actual, Iterable<? extends Statement> expected) throws Exception if (!ModelUtil.equals(expected, actual)) { StringBuilder message = new StringBuilder(128); message.append("\n=========================================\n");
final Set<Statement> expectedResult) { if (!ModelUtil.equals(expectedResult, queryResult)) {
throws Exception if (!ModelUtil.equals(expectedResult, queryResult)) {
throws Exception if (!ModelUtil.equals(expected, actual)) { StringBuilder message = new StringBuilder(128); message.append("\n=========================================\n");
protected void compareGraphs(Set<Statement> queryResult, Set<Statement> expectedResult) throws Exception if (!ModelUtil.equals(expectedResult, queryResult)) {
throws Exception if (!ModelUtil.equals(expectedResult, queryResult)) {
private void compareGraphs(Set<Statement> queryResult, Set<Statement> expectedResult) throws Exception if (!ModelUtil.equals(expectedResult, queryResult)) {
/** * Compares two models, defined by two statement collections, and returns * <tt>true</tt> if they are equal. Models are equal if they contain the same * set of statements. Blank node IDs are not relevant for model equality, * they are mapped from one model to the other by using the attached * properties. */ public static boolean equals(Iterable<? extends Statement> model1, Iterable<? extends Statement> model2) { // Filter duplicates Set<Statement> set1 = new LinkedHashSet<Statement>(); Iterators.addAll(model1.iterator(), set1); Set<Statement> set2 = new LinkedHashSet<Statement>(); Iterators.addAll(model2.iterator(), set2); return equals(set1, set2); }
protected void compareGraphs(Iterable<? extends Statement> actual, Iterable<? extends Statement> expected) throws Exception if (!ModelUtil.equals(expected, actual)) { StringBuilder message = new StringBuilder(128); message.append("\n=========================================\n");
throws Exception if (!ModelUtil.equals(expectedResult, queryResult)) {
throws Exception if (!ModelUtil.equals(expected, actual)) { StringBuilder message = new StringBuilder(128); message.append("\n=========================================\n");
throws Exception if (!ModelUtil.equals(expectedResult, queryResult)) {
protected void compareGraphs(Set<Statement> queryResult, Set<Statement> expectedResult) throws Exception if (!ModelUtil.equals(expectedResult, queryResult)) {
Assert.assertEquals(2, comparisonModel.size()); Assert.assertTrue(ModelUtil.equals(model, comparisonModel));
try { assertTrue( ModelUtil.equals( statements(Iterations.asSet(localResult)), statements(Iterations.asSet(cumulusResult))));
assertTrue(ModelUtil.equals( statements(localConnection.getStatements(null, null, null, false).asList()), statements(cumulusConnection.getStatements(null, null, null, false).asList())));