private void failOnDifference(Object expected, Object actual) { failWithMessage(String.format("Different value found in node \"%s\", expected: <%s> but was: <%s>.", path, expected, actual)); }
private void failOnDifference(Object expected, Object actual) { failWithMessage(String.format("Different value found in node \"%s\", expected: <%s> but was: <%s>.", path, expected, actual)); }
/** * Fails if compared documents are equal. The expected object is converted to JSON * before comparison. Ignores order of sibling nodes and whitespaces. * * @param expected * @return {@code this} object. */ public JsonFluentAssert isNotEqualTo(Object expected) { Diff diff = createDiff(expected, configuration); if (diff.similar()) { failWithMessage("JSON is equal."); } return this; }
/** * Fails if compared documents are equal. The expected object is converted to JSON * before comparison. Ignores order of sibling nodes and whitespaces. * * @param expected * @return {@code this} object. */ public JsonFluentAssert isNotEqualTo(Object expected) { Diff diff = createDiff(expected, configuration); if (diff.similar()) { failWithMessage("JSON is equal."); } return this; }
private void failOnType(Node node, final NodeType expectedType) { failWithMessage("Node \"" + path + "\" has invalid type, expected: <" + expectedType.getDescription() + "> but was: <" + quoteTextValue(node.getValue()) + ">."); }
private void failOnType(Node node, final NodeType expectedType) { failWithMessage("Node \"" + path + "\" has invalid type, expected: <" + expectedType.getDescription() + "> but was: <" + quoteTextValue(node.getValue()) + ">."); }