public class XMLAssert extends java.lang.Object
XMLEventReader
.Constructor and Description |
---|
XMLAssert() |
Modifier and Type | Method and Description |
---|---|
static void |
assertAttribute(javax.xml.namespace.QName expectedAttributeName,
int attributeIndex,
javax.xml.stream.XMLStreamReader reader) |
static java.lang.String |
assertAttribute(javax.xml.namespace.QName expectedAttributeName,
javax.xml.stream.events.StartElement element) |
static void |
assertAttribute(javax.xml.namespace.QName expectedAttributeName,
java.lang.String expectedAttributeValue,
int attributeIndex,
javax.xml.stream.XMLStreamReader reader) |
static java.lang.String |
assertAttribute(javax.xml.namespace.QName expectedAttributeName,
java.lang.String expectedAttributeValue,
javax.xml.stream.events.StartElement element) |
static void |
assertAttributeCount(int expectedCount,
javax.xml.stream.events.StartElement element) |
static void |
assertAttributeCount(int expectedCount,
javax.xml.stream.XMLStreamReader reader) |
static void |
assertCharactersEvent(java.lang.String expectedCharacters,
javax.xml.stream.XMLEventReader reader) |
static void |
assertCharactersEvent(java.lang.String expectedCharacters,
javax.xml.stream.XMLStreamReader reader) |
static void |
assertCommentEvent(java.lang.String expectedElement,
javax.xml.stream.XMLEventReader reader) |
static void |
assertCommentEvent(java.lang.String expectedElement,
javax.xml.stream.XMLStreamReader reader) |
static void |
assertDefaultNamespace(javax.xml.namespace.QName expectedNameSpace,
int index,
javax.xml.stream.XMLStreamReader reader) |
static void |
assertDefaultNamespace(javax.xml.namespace.QName expectedNameSpace,
javax.xml.stream.events.StartElement element) |
static void |
assertEmptyElement(javax.xml.namespace.QName expectedElement,
javax.xml.stream.XMLEventReader reader) |
static void |
assertEmptyElement(javax.xml.namespace.QName expectedElement,
javax.xml.stream.XMLStreamReader reader) |
static void |
assertEndDocument(javax.xml.stream.XMLEventReader reader) |
static void |
assertEndDocument(javax.xml.stream.XMLStreamReader reader) |
static void |
assertEndElement(javax.xml.namespace.QName expectedElement,
javax.xml.stream.XMLEventReader reader) |
static void |
assertEndElement(javax.xml.namespace.QName expectedElement,
javax.xml.stream.XMLStreamReader reader) |
static java.lang.String |
assertNamespace(javax.xml.namespace.QName expectedNameSpace,
boolean assertPrefix,
int index,
javax.xml.stream.XMLStreamReader reader) |
static java.lang.String |
assertNamespace(javax.xml.namespace.QName expectedNameSpace,
boolean assertPrefix,
javax.xml.stream.events.StartElement element) |
static void |
assertNamespaceCount(int expectedCount,
javax.xml.stream.events.StartElement element) |
static void |
assertNamespaceCount(int expectedCount,
javax.xml.stream.XMLStreamReader reader) |
static void |
assertShortElement(javax.xml.namespace.QName expectedElement,
java.lang.String expectedContent,
javax.xml.stream.XMLEventReader reader) |
static void |
assertShortElement(javax.xml.namespace.QName expectedElement,
java.lang.String expectedContent,
javax.xml.stream.XMLStreamReader reader) |
static void |
assertShortElement(javax.xml.namespace.QName expectedElement,
javax.xml.stream.XMLEventReader reader)
This method can be used to assert the presence of an XML element that only contains character content,
if the exact content should not be asserted.
|
static void |
assertShortElement(javax.xml.namespace.QName expectedElement,
javax.xml.stream.XMLStreamReader reader) |
static void |
assertStartDocument(javax.xml.stream.XMLEventReader reader) |
static void |
assertStartDocument(javax.xml.stream.XMLStreamReader reader) |
static javax.xml.stream.events.StartElement |
assertStartElement(javax.xml.namespace.QName expectedElement,
javax.xml.stream.XMLEventReader reader) |
static void |
assertStartElement(javax.xml.namespace.QName expectedElement,
javax.xml.stream.XMLStreamReader reader) |
public XMLAssert()
public static void assertStartDocument(javax.xml.stream.XMLEventReader reader) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public static void assertStartDocument(javax.xml.stream.XMLStreamReader reader) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public static void assertEndDocument(javax.xml.stream.XMLEventReader reader) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public static void assertEndDocument(javax.xml.stream.XMLStreamReader reader) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public static javax.xml.stream.events.StartElement assertStartElement(javax.xml.namespace.QName expectedElement, javax.xml.stream.XMLEventReader reader) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public static void assertStartElement(javax.xml.namespace.QName expectedElement, javax.xml.stream.XMLStreamReader reader) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public static java.lang.String assertAttribute(javax.xml.namespace.QName expectedAttributeName, java.lang.String expectedAttributeValue, javax.xml.stream.events.StartElement element)
public static void assertAttribute(javax.xml.namespace.QName expectedAttributeName, java.lang.String expectedAttributeValue, int attributeIndex, javax.xml.stream.XMLStreamReader reader)
public static java.lang.String assertAttribute(javax.xml.namespace.QName expectedAttributeName, javax.xml.stream.events.StartElement element)
public static void assertAttribute(javax.xml.namespace.QName expectedAttributeName, int attributeIndex, javax.xml.stream.XMLStreamReader reader)
public static void assertAttributeCount(int expectedCount, javax.xml.stream.events.StartElement element)
public static void assertAttributeCount(int expectedCount, javax.xml.stream.XMLStreamReader reader)
public static void assertDefaultNamespace(javax.xml.namespace.QName expectedNameSpace, javax.xml.stream.events.StartElement element)
public static void assertDefaultNamespace(javax.xml.namespace.QName expectedNameSpace, int index, javax.xml.stream.XMLStreamReader reader)
public static java.lang.String assertNamespace(javax.xml.namespace.QName expectedNameSpace, boolean assertPrefix, javax.xml.stream.events.StartElement element)
public static java.lang.String assertNamespace(javax.xml.namespace.QName expectedNameSpace, boolean assertPrefix, int index, javax.xml.stream.XMLStreamReader reader)
public static void assertNamespaceCount(int expectedCount, javax.xml.stream.events.StartElement element)
public static void assertNamespaceCount(int expectedCount, javax.xml.stream.XMLStreamReader reader)
public static void assertEndElement(javax.xml.namespace.QName expectedElement, javax.xml.stream.XMLEventReader reader) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public static void assertEndElement(javax.xml.namespace.QName expectedElement, javax.xml.stream.XMLStreamReader reader) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public static void assertCharactersEvent(java.lang.String expectedCharacters, javax.xml.stream.XMLEventReader reader) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public static void assertCharactersEvent(java.lang.String expectedCharacters, javax.xml.stream.XMLStreamReader reader) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public static void assertCommentEvent(java.lang.String expectedElement, javax.xml.stream.XMLEventReader reader) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public static void assertCommentEvent(java.lang.String expectedElement, javax.xml.stream.XMLStreamReader reader) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public static void assertShortElement(javax.xml.namespace.QName expectedElement, java.lang.String expectedContent, javax.xml.stream.XMLEventReader reader) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public static void assertShortElement(javax.xml.namespace.QName expectedElement, java.lang.String expectedContent, javax.xml.stream.XMLStreamReader reader) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public static void assertShortElement(javax.xml.namespace.QName expectedElement, javax.xml.stream.XMLEventReader reader) throws javax.xml.stream.XMLStreamException
expectedElement
- the expected name of the XML elementreader
- the reader used by the test methodjavax.xml.stream.XMLStreamException
public static void assertShortElement(javax.xml.namespace.QName expectedElement, javax.xml.stream.XMLStreamReader reader) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public static void assertEmptyElement(javax.xml.namespace.QName expectedElement, javax.xml.stream.XMLEventReader reader) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public static void assertEmptyElement(javax.xml.namespace.QName expectedElement, javax.xml.stream.XMLStreamReader reader) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException