Class XmlDocumentValidator
- java.lang.Object
-
- org.uitnet.testing.smartfwk.core.validator.xml.XmlDocumentValidator
-
public class XmlDocumentValidator extends Object
- Author:
- Madhav Krishna
-
-
Field Summary
Fields Modifier and Type Field Description protected Documentdocumentprotected XmlDocumentReaderxmlDocReaderprotected XPathxPath
-
Constructor Summary
Constructors Constructor Description XmlDocumentValidator(File xmlFilePath)XmlDocumentValidator(String xmlAsString)XmlDocumentValidator(Document xmlDoc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectfindAttributeOrTextValues(String elementName, ParamPath xpath)NodeListfindRecordsFor(String elementName, String xmlPath)DocumentgetDocument()voidvalidateAtleastNRecordsPresent(String elementName, String xmlPath, int atleastN)voidvalidateAtMaxNRecordsPresent(String elementName, String xmlPath, int atMaxN)voidvalidateExpectedNRecordsPresent(String elementName, String xmlPath, int expectedN)voidvalidatePathPresent(String elementName, String xmlPath)
-
-
-
Field Detail
-
document
protected Document document
-
xmlDocReader
protected XmlDocumentReader xmlDocReader
-
xPath
protected XPath xPath
-
-
Method Detail
-
getDocument
public Document getDocument()
-
findAttributeOrTextValues
public Object findAttributeOrTextValues(String elementName, ParamPath xpath)
-
validateExpectedNRecordsPresent
public void validateExpectedNRecordsPresent(String elementName, String xmlPath, int expectedN)
-
validateAtleastNRecordsPresent
public void validateAtleastNRecordsPresent(String elementName, String xmlPath, int atleastN)
-
-