Interface TextNodeDsl<A>
- Type Parameters:
A- the final assertion
- All Known Subinterfaces:
JsonNodeAssertDsl<A>
- All Known Implementing Classes:
AssertJson,ConditionList,CoreJsonAssertion,HamcrestJsonAssertion,HamcrestJsonAssertionBuilder,JsonAssertDslBuilders.At,PathDsl,TextNodes
Test node specific assertions
-
Method Summary
Modifier and TypeMethodDescriptiondefault AAssert that the node is text and emptydefault AAssert that the node is text and is not emptydefault AAssert that the node is not a text nodedefault AAssert that the node is a text node with value different to the given onedefault AisText()Assert that the node is a text nodedefault AAssert that the node is a text node with a given valuedefault AAssert that the text matches a regular expressiondefault AAssert that the node is text matching a regular expressiondefault AsatisfiesTextCondition(Condition condition) Assert that the value is text, meeting an additional conditiondefault AtextContains(String substring) Assert that the text of this node contains a substringdefault AtextDoesNotContain(String substring) Assert that the text of this node contains a substringdefault AtextDoesNotStartWith(String substring) Assert that the text of this node does not start with a substringdefault AtextMatches(String conditionName, Predicate<String> predicate) Assert that the text matches a custom predicatedefault AtextStartsWith(String substring) Assert that the text of this node starts with a substring
-
Method Details
-
satisfiesTextCondition
Assert that the value is text, meeting an additional condition- Parameters:
condition- the number condition- Returns:
- the assertion for fluent assertions, with this condition added
-
matches
Assert that the node is text matching a regular expression- Parameters:
regex- the expression- Returns:
- the assertion for fluent assertions, with this condition added
-
matches
Assert that the text matches a regular expression- Parameters:
regex- the expression- Returns:
- the assertion for fluent assertions, with this condition added
-
textMatches
Assert that the text matches a custom predicate- Parameters:
conditionName- the name of the conditionpredicate- the required condition- Returns:
- the assertion for fluent assertions, with this condition added
-
isText
Assert that the node is a text node- Returns:
- the assertion for fluent assertions, with this condition added
-
isText
Assert that the node is a text node with a given value- Parameters:
text- the expected value- Returns:
- the assertion for fluent assertions, with this condition added
-
isNotText
Assert that the node is not a text node- Returns:
- the assertion for fluent assertions, with this condition added
-
isNotText
Assert that the node is a text node with value different to the given one- Parameters:
text- the expected value- Returns:
- the assertion for fluent assertions, with this condition added
-
isEmptyText
Assert that the node is text and empty- Returns:
- the assertion for fluent assertions, with this condition added
-
isNotEmptyText
Assert that the node is text and is not empty- Returns:
- the assertion for fluent assertions, with this condition added
-
textContains
Assert that the text of this node contains a substring- Parameters:
substring- the substring to find- Returns:
- the assertion for fluent assertions, with this condition added
-
textDoesNotContain
Assert that the text of this node contains a substring- Parameters:
substring- the substring to find- Returns:
- the assertion for fluent assertions, with this condition added
-
textStartsWith
Assert that the text of this node starts with a substring- Parameters:
substring- the substring to find- Returns:
- the assertion for fluent assertions, with this condition added
-
textDoesNotStartWith
Assert that the text of this node does not start with a substring- Parameters:
substring- the substring to find- Returns:
- the assertion for fluent assertions, with this condition added
-