hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
XMLCleanerTest.hpp
Go to the documentation of this file.
1 
16 #ifndef XML_CLEANER_TEST_HPP
17 #define XML_CLEANER_TEST_HPP
18 
19 #include <cppunit/TestCaller.h>
20 #include <cppunit/TestCase.h>
21 #include <cppunit/TestFixture.h>
22 #include <cppunit/TestResult.h>
23 #include <cppunit/TestSuite.h>
24 #include <cppunit/ui/text/TestRunner.h>
25 #include <Poco/SharedPtr.h>
26 
27 #include "XMLCleaner.hpp"
28 
29 class XMLCleanerTest: public CppUnit::TestFixture
30 {
31  protected:
32  class XMLCleanerA: public XMLCleaner
33  {
34  public:
36  XMLCleanerA(const std::string &_XMLPath, const std::string &_elemName, const std::string &_idName):XMLCleaner(_XMLPath, _elemName, _idName) {}
37  std::string saveXMLWrp(Poco::XML::Node* node) {return XMLCleaner::saveXML(node);}
38  std::string processWrp(const std::string &inXML, const std::set<unsigned long long> &delList) {return XMLCleaner::process(inXML, delList);}
39  virtual ~XMLCleanerA() {};
40  };
41  protected:
42  Poco::SharedPtr<XMLCleanerA> xmlCleanerA;
43  protected:
44  void saveXMLTest();
45  void processTest();
46  public:
48  virtual void setUp();
49  virtual void tearDown();
50  static CppUnit::Test *suite();
52 };
53 
54 #endif