private Difference verify(Object key, DataModelReflection expected, DataModelReflection actual) { assert key != null; assert expected != null || actual != null; Object result = rule.verify(expected, actual); if (result == null) { return null; } return new Difference(expected, actual, result); } }
@Override public String toString() { return MessageFormat.format( Messages.getString("Difference.message"), //$NON-NLS-1$ getExpected(), getActual(), getDiagnostic()); }
static String format(Object value) { return Difference.format(value); }
private DataModelReflection key(Difference difference) { assert difference != null; DataModelReflection expected = difference.getExpected(); DataModelReflection actual = difference.getActual(); if (expected != null) { return expected; } else if (actual != null) { return actual; } else { return null; } } }
} else { for (Difference diff : diffList) { LOG.error(diff.toString());
writer.println("<div class=\"diagnostic\">"); //$NON-NLS-1$ writer.println("<span class=\"diagnostic-message\">"); //$NON-NLS-1$ writer.println(toHtml(difference.getDiagnostic())); writer.println("</span>"); //$NON-NLS-1$ writer.println("</div>"); //$NON-NLS-1$ DataModelReflection expected = difference.getExpected(); DataModelReflection actual = difference.getActual(); for (PropertyName property : definition.getProperties()) { writer.println("<tr>"); //$NON-NLS-1$
DataModelReflection saw = sawActual.get(key); if (saw != null) { results.add(new Difference(actual, null, MessageFormat.format( Messages.getString("VerifyEngine.errorConflictActualDataKey"), //$NON-NLS-1$ key,
private Difference createDifference(long actual) { PropertyName name = PropertyName.newInstance("count"); return new Difference( new DataModelReflection(Collections.singletonMap(name, expected)), new DataModelReflection(Collections.singletonMap(name, actual)), "count verification was failed"); }
private Difference createDifference(long actual) { PropertyName name = PropertyName.newInstance("count"); return new Difference( new DataModelReflection(Collections.singletonMap(name, expected)), new DataModelReflection(Collections.singletonMap(name, actual)), "count verification was failed"); }
private Difference createDifference(long actual) { PropertyName name = PropertyName.newInstance("count"); return new Difference( new DataModelReflection(Collections.singletonMap(name, expected)), new DataModelReflection(Collections.singletonMap(name, actual)), "count verification was failed"); }
private Difference createDifference(long actual) { PropertyName name = PropertyName.newInstance("count"); return new Difference( new DataModelReflection(Collections.singletonMap(name, expected)), new DataModelReflection(Collections.singletonMap(name, actual)), "count verification was failed"); }