public class MultipleNodeAssert extends org.assertj.core.api.FactoryBasedNavigableIterableAssert<MultipleNodeAssert,Iterable<Node>,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 | Method and Description |
---|---|
void |
doNotExist()
Equivalent for
AbstractIterableAssert.isEmpty() . |
MultipleNodeAssert |
doNotHaveAttribute(String attributeName)
Verifies that all the actual nodes don't have attribute with given name.
|
MultipleNodeAssert |
doNotHaveAttribute(String attributeName,
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(String attributeName)
Verifies that all the actual nodes have attribute with given name.
|
MultipleNodeAssert |
haveAttribute(String attributeName,
String attributeValue)
Verifies that all the actual nodes have attribute with given name and value.
|
are, areAtLeast, areAtLeastOne, areAtMost, areExactly, areNot, as, as, contains, containsAll, containsAnyElementsOf, containsAnyOf, containsExactly, containsExactlyElementsOf, containsExactlyInAnyOrder, containsExactlyInAnyOrderElementsOf, containsNull, containsOnly, containsOnlyElementsOf, containsOnlyNulls, containsOnlyOnce, containsSequence, containsSequence, containsSubsequence, containsSubsequence, describedAs, describedAs, doesNotContain, doesNotContainAnyElementsOf, doesNotContainNull, doesNotContainSequence, doesNotContainSequence, doesNotContainSubsequence, doesNotContainSubsequence, doesNotHave, doesNotHaveAnyElementsOfTypes, doesNotHaveDuplicates, doesNotHaveSameClassAs, doNotHave, element, endsWith, endsWith, extracting, extracting, extracting, extracting, extractingResultOf, extractingResultOf, filteredOn, filteredOn, filteredOn, filteredOnNull, first, flatExtracting, flatExtracting, flatExtracting, has, hasAtLeastOneElementOfType, hasOnlyElementsOfType, hasOnlyElementsOfTypes, 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, usingComparatorForType, usingComparisonStrategy, usingDefaultComparator, usingDefaultElementComparator, usingElementComparator, usingElementComparatorIgnoringFields, usingElementComparatorOnFields, usingFieldByFieldElementComparator, usingRecursiveFieldByFieldElementComparator, withFailMessage, withThreadDumpOnError
public MultipleNodeAssert exist()
AbstractIterableAssert.isNotEmpty()
.public void doNotExist()
AbstractIterableAssert.isEmpty()
.public MultipleNodeAssert haveAttribute(String attributeName)
If the actual nodes iterable is empty, this assertion succeeds as there is no elements to check.
AssertionError
- if the actual nodes iterable is null
.AssertionError
- if one or more nodes don't have attribute with given name.public MultipleNodeAssert haveAttribute(String attributeName, String attributeValue)
If the actual nodes iterable is empty, this assertion succeeds as there is no elements to check.
AssertionError
- if the actual nodes iterable is null
.AssertionError
- if one or more nodes don't have attribute with given name and value.public MultipleNodeAssert doNotHaveAttribute(String attributeName)
If the actual nodes iterable is empty, this assertion succeeds as there is no elements to check.
AssertionError
- if the actual nodes iterable is null
.AssertionError
- if any node has attribute with given name.public MultipleNodeAssert doNotHaveAttribute(String attributeName, String attributeValue)
If the actual nodes iterable is empty, this assertion succeeds as there is no elements to check.
AssertionError
- if the actual nodes iterable is null
.AssertionError
- if any node has attribute with given name and value.Copyright © 2001–2019 XMLUnit. All rights reserved.