ComponentTestHelper Class Reference

Class to test a single component. More...

#include <ComponentTest.h>

List of all members.

Public Member Functions

 ComponentTestHelper ()
ScriptInterfaceGetScriptInterface ()
CSimContextGetSimContext ()
template<typename T >
T * Add (EComponentTypeId cid, const std::string &xml, entity_id_t ent=10)
 Call this once to initialise the test helper with a component.
void AddMock (entity_id_t ent, EInterfaceId iid, IComponent &component)
void HandleMessage (IComponent *cmp, const CMessage &msg, bool global)
void Roundtrip (bool verbose=false)
 Checks that the object roundtrips through its serialize/deserialize functions correctly.

Private Attributes

CSimContext m_Context
CComponentManager m_ComponentManager
CParamNode m_Param
IComponentm_Cmp
EComponentTypeId m_Cid

Detailed Description

Class to test a single component.


Constructor & Destructor Documentation

ComponentTestHelper::ComponentTestHelper (  )  [inline]

Member Function Documentation

template<typename T >
T* ComponentTestHelper::Add ( EComponentTypeId  cid,
const std::string &  xml,
entity_id_t  ent = 10 
) [inline]

Call this once to initialise the test helper with a component.

void ComponentTestHelper::AddMock ( entity_id_t  ent,
EInterfaceId  iid,
IComponent component 
) [inline]
ScriptInterface& ComponentTestHelper::GetScriptInterface (  )  [inline]
CSimContext& ComponentTestHelper::GetSimContext (  )  [inline]
void ComponentTestHelper::HandleMessage ( IComponent cmp,
const CMessage msg,
bool  global 
) [inline]
void ComponentTestHelper::Roundtrip ( bool  verbose = false  )  [inline]

Checks that the object roundtrips through its serialize/deserialize functions correctly.

Computes the debug output, hash, and binary serialization; then deserializes into a new system and checks the serialization outputs are unchanged.


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed May 16 03:15:27 2012 for Pyrogenesis by  doxygen 1.6.3