private JsonFluentAssert isPresent(String expectedValue) { if (nodeAbsent(actual, path, configuration)) { failOnDifference(expectedValue, "missing"); } return this; }
private JsonFluentAssert isPresent(String expectedValue) { if (nodeAbsent(actual, path, configuration)) { failOnDifference(expectedValue, "missing"); } return this; }
/** * Fails if the node exists. * * @return */ public JsonFluentAssert isAbsent() { if (!nodeAbsent(actual, path, configuration)) { failOnDifference("node to be absent", quoteTextValue(getNode(actual, path))); } return this; }
/** * Fails if the node exists. * * @return */ public JsonFluentAssert isAbsent() { if (!nodeAbsent(actual, path, configuration)) { failOnDifference("node to be absent", quoteTextValue(getNode(actual, path))); } return this; }
/** * Fails if the selected JSON is not a String or is not present or the value * is not equal to expected value. */ public JsonFluentAssert isStringEqualTo(String expected) { isString(); Node node = getNode(actual, path); if (!node.asText().equals(expected)) { failOnDifference(quoteTextValue(expected), quoteTextValue(node.asText())); } return this; }
/** * Fails if the selected JSON is not a String or is not present or the value * is not equal to expected value. */ public JsonFluentAssert isStringEqualTo(String expected) { isString(); Node node = getNode(actual, path); if (!node.asText().equals(expected)) { failOnDifference(quoteTextValue(expected), quoteTextValue(node.asText())); } return this; }