OpenSDN source code
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, AgentUtXmlTestConfigCreateFnAgentUtXmlTestConfigFactory
 
typedef std::map< std::string, AgentUtXmlTestValidateCreateFnAgentUtXmlTestValidateFactory
 

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

◆ AgentUtXmlTestConfigCreateFn

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.

◆ AgentUtXmlTestConfigFactory

Definition at line 59 of file test_xml.h.

◆ AgentUtXmlTestList

Definition at line 44 of file test_xml.h.

◆ AgentUtXmlTestValidateCreateFn

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.

◆ AgentUtXmlTestValidateFactory

Definition at line 61 of file test_xml.h.

Constructor & Destructor Documentation

◆ AgentUtXmlTest()

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

Definition at line 138 of file test_xml.cc.

◆ ~AgentUtXmlTest()

AgentUtXmlTest::~AgentUtXmlTest ( )
virtual

Definition at line 141 of file test_xml.cc.

Member Function Documentation

◆ AddConfigEntry()

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

Definition at line 149 of file test_xml.cc.

◆ AddValidateEntry()

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

Definition at line 154 of file test_xml.cc.

◆ DISALLOW_COPY_AND_ASSIGN()

AgentUtXmlTest::DISALLOW_COPY_AND_ASSIGN ( AgentUtXmlTest  )
private

◆ GetConfigCreateFn()

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

Definition at line 160 of file test_xml.cc.

◆ GetValidateCreateFn()

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

Definition at line 170 of file test_xml.cc.

◆ Load()

bool AgentUtXmlTest::Load ( )

Definition at line 208 of file test_xml.cc.

◆ ReadXml()

bool AgentUtXmlTest::ReadXml ( )

Definition at line 178 of file test_xml.cc.

Here is the call graph for this function:

◆ Run() [1/2]

bool AgentUtXmlTest::Run ( void  )

Definition at line 254 of file test_xml.cc.

◆ Run() [2/2]

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

Definition at line 263 of file test_xml.cc.

◆ ToString()

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

Definition at line 242 of file test_xml.cc.

Member Data Documentation

◆ config_factory_

AgentUtXmlTestConfigFactory AgentUtXmlTest::config_factory_
private

Definition at line 82 of file test_xml.h.

◆ doc_

pugi::xml_document AgentUtXmlTest::doc_
private

Definition at line 80 of file test_xml.h.

◆ file_name_

std::string AgentUtXmlTest::file_name_
private

Definition at line 78 of file test_xml.h.

◆ name_

std::string AgentUtXmlTest::name_
private

Definition at line 79 of file test_xml.h.

◆ test_list_

AgentUtXmlTestList AgentUtXmlTest::test_list_
private

Definition at line 81 of file test_xml.h.

◆ validate_factory_

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: