LibreOffice Module test (master)
1
|
#include <xmltesttools.hxx>
Static Public Member Functions | |
static xmlDocUniquePtr | parseXmlStream (SvStream *pStream) |
Return xmlDocPtr representation of the XML stream read from pStream. More... | |
static xmlDocUniquePtr | dumpAndParse (MetafileXmlDump &rDumper, const GDIMetaFile &rGDIMetaFile) |
Protected Member Functions | |
XmlTestTools () | |
virtual | ~XmlTestTools () |
virtual void | registerNamespaces (xmlXPathContextPtr &pXmlXpathCtx) |
xmlXPathObjectPtr | getXPathNode (const xmlDocUniquePtr &pXmlDoc, const OString &rXPath) |
OUString | getXPath (const xmlDocUniquePtr &pXmlDoc, const OString &rXPath, const OString &rAttribute) |
Same as the assertXPath(), but don't assert: return the string instead. More... | |
OUString | getXPathContent (const xmlDocUniquePtr &pXmlDoc, const OString &rXPath) |
Same as the assertXPathContent(), but don't assert: return the string instead. More... | |
int | getXPathPosition (const xmlDocUniquePtr &pXmlDoc, const OString &rXPath, std::string_view rChildName) |
Get the position of the child named rName of the parent node specified by rXPath. More... | |
void | assertXPath (const xmlDocUniquePtr &pXmlDoc, const OString &rXPath) |
Assert that rXPath exists, and returns exactly one node. More... | |
void | assertXPath (const xmlDocUniquePtr &pXmlDoc, const OString &rXPath, const OString &rAttribute, const OUString &rExpectedValue) |
Assert that rXPath exists, returns exactly one node, and the rXPath's attribute's value equals to the rExpected value. More... | |
void | assertXPathAttrs (const xmlDocUniquePtr &pXmlDoc, const OString &rXPath, const std::vector< std::pair< OString, OUString >> &aPairVector) |
void | assertXPath (const xmlDocUniquePtr &pXmlDoc, const OString &rXPath, int nNumberOfNodes) |
Assert that rXPath exists, and returns exactly nNumberOfNodes nodes. More... | |
void | assertXPathContent (const xmlDocUniquePtr &pXmlDoc, const OString &rXPath, const OUString &rContent) |
Assert that rXPath exists, and its content equals rContent. More... | |
void | assertXPathNSDef (const xmlDocUniquePtr &pXmlDoc, const OString &rXPath, std::u16string_view rNSPrefix, std::u16string_view rNSHref) |
Assert that rXPath exists and it has an rNSPrefix=rNSHref namespace definition. More... | |
void | assertXPathChildren (const xmlDocUniquePtr &pXmlDoc, const OString &rXPath, int nNumberOfChildNodes) |
Assert that rXPath exists, and has exactly nNumberOfChildNodes child nodes. More... | |
void | assertXPathNoAttribute (const xmlDocUniquePtr &pXmlDoc, const OString &rXPath, const OString &rAttribute) |
Assert that rXPath exists, has exactly 1 result set nodes and does not have an attribute named rAttribute. More... | |
Static Protected Member Functions | |
static xmlDocUniquePtr | parseXml (utl::TempFile const &aTempFile) |
static void | registerODFNamespaces (xmlXPathContextPtr &pXmlXpathCtx) |
static void | registerOOXMLNamespaces (xmlXPathContextPtr &pXmlXpathCtx) |
Definition at line 33 of file xmltesttools.hxx.
|
protected |
Definition at line 39 of file xmltesttools.cxx.
|
protectedvirtual |
Definition at line 42 of file xmltesttools.cxx.
|
protected |
Assert that rXPath exists, and returns exactly one node.
Definition at line 163 of file xmltesttools.cxx.
References getXPath().
Referenced by assertXPathAttrs().
|
protected |
Assert that rXPath exists, returns exactly one node, and the rXPath's attribute's value equals to the rExpected value.
Definition at line 168 of file xmltesttools.cxx.
References getXPath().
|
protected |
Assert that rXPath exists, and returns exactly nNumberOfNodes nodes.
Useful for checking that we do not export some node (nNumberOfNodes == 0).
Definition at line 184 of file xmltesttools.cxx.
References getXPathNode().
|
protected |
Definition at line 175 of file xmltesttools.cxx.
References assertXPath().
|
protected |
Assert that rXPath exists, and has exactly nNumberOfChildNodes child nodes.
Useful for checking that we do have a no child nodes to a specific node (nNumberOfChildNodes == 0).
Definition at line 225 of file xmltesttools.cxx.
References getXPathNode(), and void().
|
protected |
Assert that rXPath exists, and its content equals rContent.
Definition at line 193 of file xmltesttools.cxx.
References getXPathContent().
|
protected |
Assert that rXPath exists, has exactly 1 result set nodes and does not have an attribute named rAttribute.
Definition at line 243 of file xmltesttools.cxx.
References getXPathNode().
|
protected |
Assert that rXPath exists and it has an rNSPrefix=rNSHref namespace definition.
Definition at line 198 of file xmltesttools.cxx.
References getXPathNode().
|
static |
Definition at line 62 of file xmltesttools.cxx.
References MetafileXmlDump::dump(), parseXmlStream(), SvStream::Seek(), and STREAM_SEEK_TO_BEGIN.
|
protected |
Same as the assertXPath(), but don't assert: return the string instead.
Definition at line 83 of file xmltesttools.cxx.
References getXPathNode().
Referenced by assertXPath().
|
protected |
Same as the assertXPathContent(), but don't assert: return the string instead.
Definition at line 107 of file xmltesttools.cxx.
References getXPathNode().
Referenced by assertXPathContent().
|
protected |
Definition at line 70 of file xmltesttools.cxx.
References registerNamespaces().
Referenced by assertXPath(), assertXPathChildren(), assertXPathNoAttribute(), assertXPathNSDef(), getXPath(), getXPathContent(), and getXPathPosition().
|
protected |
Get the position of the child named rName of the parent node specified by rXPath.
Useful for checking relative order of elements.
Definition at line 255 of file xmltesttools.cxx.
References getXPathNode().
|
staticprotected |
Definition at line 45 of file xmltesttools.cxx.
References utl::TempFile::GetURL(), and parseXmlStream().
|
static |
Return xmlDocPtr representation of the XML stream read from pStream.
Definition at line 51 of file xmltesttools.cxx.
References SvStream::ReadBytes(), SvStream::remainingSize(), and SAL_INFO.
Referenced by dumpAndParse(), and parseXml().
|
protectedvirtual |
Definition at line 79 of file xmltesttools.cxx.
Referenced by getXPathNode().
|
staticprotected |
Definition at line 282 of file xmltesttools.cxx.
|
staticprotected |
Definition at line 365 of file xmltesttools.cxx.