public class MultipleNodeAssert extends org.assertj.core.api.FactoryBasedNavigableIterableAssert<MultipleNodeAssert,java.lang.Iterable<org.w3c.dom.Node>,org.w3c.dom.Node,SingleNodeAssert>
Iterable
of Node
.
Simple Example
import static org.xmlunit.assertj.XmlAssert.assertThat; final String xml = "<a><b attr=\"abc\"></b></a>"; assertThat(xml).nodesByXPath("//a/b").haveAttribute("attr").
Modifier and Type | Class and Description |
---|---|
(package private) static interface |
MultipleNodeAssert.SingleNodeAssertConsumer |
Modifier | Constructor and Description |
---|---|
private |
MultipleNodeAssert(java.lang.Iterable<org.w3c.dom.Node> nodes) |
Modifier and Type | Method and Description |
---|---|
private void |
allSatisfy(MultipleNodeAssert.SingleNodeAssertConsumer consumer) |
(package private) static MultipleNodeAssert |
create(java.lang.Object xmlSource,
java.util.Map<java.lang.String,java.lang.String> prefix2Uri,
javax.xml.parsers.DocumentBuilderFactory dbf,
javax.xml.xpath.XPathFactory xpf,
java.lang.String xPath) |
void |
doNotExist()
Equivalent for
AbstractIterableAssert.isEmpty() . |
MultipleNodeAssert |
doNotHaveAttribute(java.lang.String attributeName)
Verifies that all the actual nodes don't have attribute with given name.
|
MultipleNodeAssert |
doNotHaveAttribute(java.lang.String attributeName,
java.lang.String attributeValue)
Verifies that all the actual nodes don't have attribute with given name and value.
|
MultipleNodeAssert |
exist()
Equivalent for
AbstractIterableAssert.isNotEmpty() . |
MultipleNodeAssert |
haveAttribute(java.lang.String attributeName)
Verifies that all the actual nodes have attribute with given name.
|
MultipleNodeAssert |
haveAttribute(java.lang.String attributeName,
java.lang.String attributeValue)
Verifies that all the actual nodes have attribute with given name and value.
|
allMatch, allMatch, allSatisfy, anySatisfy, are, areAtLeast, areAtLeastOne, areAtMost, areExactly, areNot, as, as, contains, containsAll, containsExactly, containsExactlyElementsOf, containsExactlyInAnyOrder, containsNull, containsOnly, containsOnlyElementsOf, containsOnlyOnce, containsSequence, containsSequence, containsSubsequence, containsSubsequence, describedAs, describedAs, doesNotContain, doesNotContainAnyElementsOf, doesNotContainNull, doesNotContainSequence, doesNotContainSequence, doesNotContainSubsequence, doesNotContainSubsequence, doesNotHave, doesNotHaveDuplicates, doesNotHaveSameClassAs, doNotHave, element, endsWith, extracting, extracting, extracting, extracting, extracting, extracting, extractingResultOf, extractingResultOf, filteredOn, filteredOn, filteredOn, filteredOn, filteredOnNull, first, flatExtracting, flatExtracting, flatExtracting, flatExtracting, flatExtracting, flatExtracting, has, hasAtLeastOneElementOfType, hasOnlyElementsOfType, hasOnlyElementsOfTypes, hasOnlyOneElementSatisfying, hasSameClassAs, hasSameElementsAs, hasSameSizeAs, hasSameSizeAs, hasSize, hasToString, have, haveAtLeast, haveAtLeastOne, haveAtMost, haveExactly, inBinary, inHexadecimal, is, isEmpty, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isNot, isNotEmpty, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNullOrEmpty, isOfAnyClassIn, isSameAs, isSubsetOf, isSubsetOf, last, navigationDescription, newListAssertInstance, overridingErrorMessage, size, startsWith, toLazyIterable, usingComparator, usingComparatorForElementFieldsWithNames, usingComparatorForElementFieldsWithType, usingComparisonStrategy, usingDefaultComparator, usingDefaultElementComparator, usingElementComparator, usingElementComparatorIgnoringFields, usingElementComparatorOnFields, usingFieldByFieldElementComparator, usingRecursiveFieldByFieldElementComparator, withFailMessage, withThreadDumpOnError
private MultipleNodeAssert(java.lang.Iterable<org.w3c.dom.Node> nodes)
static MultipleNodeAssert create(java.lang.Object xmlSource, java.util.Map<java.lang.String,java.lang.String> prefix2Uri, javax.xml.parsers.DocumentBuilderFactory dbf, javax.xml.xpath.XPathFactory xpf, java.lang.String xPath)
public MultipleNodeAssert exist()
AbstractIterableAssert.isNotEmpty()
.public void doNotExist()
AbstractIterableAssert.isEmpty()
.public MultipleNodeAssert haveAttribute(java.lang.String attributeName)
If the actual nodes iterable is empty, this assertion succeeds as there is no elements to check.
java.lang.AssertionError
- if the actual nodes iterable is null
.java.lang.AssertionError
- if one or more nodes don't have attribute with given name.public MultipleNodeAssert haveAttribute(java.lang.String attributeName, java.lang.String attributeValue)
If the actual nodes iterable is empty, this assertion succeeds as there is no elements to check.
java.lang.AssertionError
- if the actual nodes iterable is null
.java.lang.AssertionError
- if one or more nodes don't have attribute with given name and value.public MultipleNodeAssert doNotHaveAttribute(java.lang.String attributeName)
If the actual nodes iterable is empty, this assertion succeeds as there is no elements to check.
java.lang.AssertionError
- if the actual nodes iterable is null
.java.lang.AssertionError
- if any node has attribute with given name.public MultipleNodeAssert doNotHaveAttribute(java.lang.String attributeName, java.lang.String attributeValue)
If the actual nodes iterable is empty, this assertion succeeds as there is no elements to check.
java.lang.AssertionError
- if the actual nodes iterable is null
.java.lang.AssertionError
- if any node has attribute with given name and value.private void allSatisfy(MultipleNodeAssert.SingleNodeAssertConsumer consumer)