OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AgentUtXmlTest Class Reference

#include <test_xml.h>

Collaboration diagram for AgentUtXmlTest:

Public Types

typedef boost::function
< AgentUtXmlNode *(const
std::string type, const
std::string &name, const
boost::uuids::uuid &id, const
pugi::xml_node &node,
AgentUtXmlTestCase *test_case)> 
AgentUtXmlTestConfigCreateFn
 
typedef boost::function
< AgentUtXmlValidationNode
*(const std::string &type,
const std::string &name, const
boost::uuids::uuid &id, const
pugi::xml_node &node)> 
AgentUtXmlTestValidateCreateFn
 
typedef std::map< std::string,
AgentUtXmlTestConfigCreateFn
AgentUtXmlTestConfigFactory
 
typedef std::map< std::string,
AgentUtXmlTestValidateCreateFn
AgentUtXmlTestValidateFactory
 

Public Member Functions

 AgentUtXmlTest (const std::string &file_name)
 
virtual ~AgentUtXmlTest ()
 
bool Load ()
 
bool ReadXml ()
 
void ToString (std::string *str)
 
bool Run ()
 
bool Run (std::string test_case)
 
void AddConfigEntry (const std::string &name, AgentUtXmlTestConfigCreateFn fn)
 
void AddValidateEntry (const std::string &name, AgentUtXmlTestValidateCreateFn fn)
 
AgentUtXmlTestConfigCreateFn GetConfigCreateFn (const std::string &name)
 
AgentUtXmlTestValidateCreateFn GetValidateCreateFn (const std::string &name)
 

Private Types

typedef std::vector
< AgentUtXmlTestCase * > 
AgentUtXmlTestList
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (AgentUtXmlTest)
 

Private Attributes

std::string file_name_
 
std::string name_
 
pugi::xml_document doc_
 
AgentUtXmlTestList test_list_
 
AgentUtXmlTestConfigFactory config_factory_
 
AgentUtXmlTestValidateFactory validate_factory_
 

Detailed Description

Definition at line 42 of file test_xml.h.

Member Typedef Documentation

typedef boost::function<AgentUtXmlNode *(const std::string type, const std::string &name, const boost::uuids::uuid &id, const pugi::xml_node &node, AgentUtXmlTestCase *test_case)> AgentUtXmlTest::AgentUtXmlTestConfigCreateFn

Definition at line 51 of file test_xml.h.

Definition at line 59 of file test_xml.h.

Definition at line 44 of file test_xml.h.

typedef boost::function<AgentUtXmlValidationNode * (const std::string &type, const std::string &name, const boost::uuids::uuid &id, const pugi::xml_node &node)> AgentUtXmlTest::AgentUtXmlTestValidateCreateFn

Definition at line 56 of file test_xml.h.

Definition at line 61 of file test_xml.h.

Constructor & Destructor Documentation

AgentUtXmlTest::AgentUtXmlTest ( const std::string &  file_name)

Definition at line 138 of file test_xml.cc.

AgentUtXmlTest::~AgentUtXmlTest ( )
virtual

Definition at line 141 of file test_xml.cc.

Member Function Documentation

void AgentUtXmlTest::AddConfigEntry ( const std::string &  name,
AgentUtXmlTestConfigCreateFn  fn 
)

Definition at line 149 of file test_xml.cc.

void AgentUtXmlTest::AddValidateEntry ( const std::string &  name,
AgentUtXmlTestValidateCreateFn  fn 
)

Definition at line 154 of file test_xml.cc.

AgentUtXmlTest::DISALLOW_COPY_AND_ASSIGN ( AgentUtXmlTest  )
private
AgentUtXmlTest::AgentUtXmlTestConfigCreateFn AgentUtXmlTest::GetConfigCreateFn ( const std::string &  name)

Definition at line 160 of file test_xml.cc.

AgentUtXmlTest::AgentUtXmlTestValidateCreateFn AgentUtXmlTest::GetValidateCreateFn ( const std::string &  name)

Definition at line 170 of file test_xml.cc.

bool AgentUtXmlTest::Load ( )

Definition at line 208 of file test_xml.cc.

bool AgentUtXmlTest::ReadXml ( )

Definition at line 178 of file test_xml.cc.

Here is the call graph for this function:

bool AgentUtXmlTest::Run ( void  )

Definition at line 254 of file test_xml.cc.

bool AgentUtXmlTest::Run ( std::string  test_case)

Definition at line 263 of file test_xml.cc.

void AgentUtXmlTest::ToString ( std::string *  str)

Definition at line 242 of file test_xml.cc.

Member Data Documentation

AgentUtXmlTestConfigFactory AgentUtXmlTest::config_factory_
private

Definition at line 82 of file test_xml.h.

pugi::xml_document AgentUtXmlTest::doc_
private

Definition at line 80 of file test_xml.h.

std::string AgentUtXmlTest::file_name_
private

Definition at line 78 of file test_xml.h.

std::string AgentUtXmlTest::name_
private

Definition at line 79 of file test_xml.h.

AgentUtXmlTestList AgentUtXmlTest::test_list_
private

Definition at line 81 of file test_xml.h.

AgentUtXmlTestValidateFactory AgentUtXmlTest::validate_factory_
private

Definition at line 83 of file test_xml.h.


The documentation for this class was generated from the following files: