wxTst::ProvokedWarningRegistry Class Reference

Manage registered provoked warnings allowing the detection of unexpected (real) test case failures. More...

#include <ProvokedWarningRegistry.h>

Collaboration diagram for wxTst::ProvokedWarningRegistry:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual const ProvokedWarningFindRegisteredWarning (const wxString &caption, const wxString &message=_T("")) const
 Find first registerd warning fitting the specified caption and message.
virtual bool IsRegisteredAndInTime (const ProvokedWarning &warning) const
 Check if provoked/expected warning is registered and time out interval has not exceeded.
virtual void RegisterWarning (const ProvokedWarning &warning)
 Register provoked/expected warning.
virtual void SetWarningAsDetected (const ProvokedWarning &warning)
 Set provoked/expected warning to has been detected.
virtual void UnregisterWarning (const ProvokedWarning &warning)
 Unregister and remove provoked/expected warning from container.
virtual bool WasDetected (const ProvokedWarning &warning) const
 Check if this provoked/expected warning was detected.

Static Public Member Functions

static void Destroy ()
 Threadsafe destruction of static singleton instance.
static ProvokedWarningRegistryGetInstance ()
 Get single private instance (Singleton pattern).

Protected Member Functions

 ProvokedWarningRegistry ()
 Constructor.
virtual ~ProvokedWarningRegistry ()
 Destructor.


Detailed Description

Manage registered provoked warnings allowing the detection of unexpected (real) test case failures.

(Using Singleton pattern.)

Definition at line 35 of file ProvokedWarningRegistry.h.


Constructor & Destructor Documentation

ProvokedWarningRegistry::ProvokedWarningRegistry (  )  [protected]

Constructor.

Definition at line 26 of file ProvokedWarningRegistry.cpp.

Referenced by GetInstance().

ProvokedWarningRegistry::~ProvokedWarningRegistry (  )  [protected, virtual]

Destructor.

Definition at line 32 of file ProvokedWarningRegistry.cpp.

References UnregisterWarning().


Member Function Documentation

void ProvokedWarningRegistry::Destroy (  )  [static]

Threadsafe destruction of static singleton instance.

Definition at line 53 of file ProvokedWarningRegistry.cpp.

const ProvokedWarning * ProvokedWarningRegistry::FindRegisteredWarning ( const wxString &  caption,
const wxString &  message = _T("") 
) const [virtual]

Find first registerd warning fitting the specified caption and message.

Parameters:
caption caption of provoked/expected warnings to find
message message of provoked/expected warnings to find; leave empty if you don't care what about matching the message.
Returns:
corresponding registered warning if found, or NULL if there is no appropriate one

Definition at line 133 of file ProvokedWarningRegistry.cpp.

References wxTst::ProvokedWarning::GetCaption(), and wxTst::ProvokedWarning::GetMessage().

Referenced by wxTst::WxGuiTestHelper::IsProvokedWarning().

ProvokedWarningRegistry & ProvokedWarningRegistry::GetInstance (  )  [static]

Get single private instance (Singleton pattern).

Returns:
single private registry instance

Definition at line 43 of file ProvokedWarningRegistry.cpp.

References ProvokedWarningRegistry().

Referenced by wxTst::WxGuiTestHelper::IsProvokedWarning().

bool ProvokedWarningRegistry::IsRegisteredAndInTime ( const ProvokedWarning warning  )  const [virtual]

Check if provoked/expected warning is registered and time out interval has not exceeded.

Parameters:
warning provoked/expected warning to check for registration
Returns:
true, if warning is registered and in time

Definition at line 79 of file ProvokedWarningRegistry.cpp.

References wxTst::ProvokedWarning::GetTimeout().

Referenced by wxTst::WxGuiTestHelper::IsProvokedWarning().

void ProvokedWarningRegistry::RegisterWarning ( const ProvokedWarning warning  )  [virtual]

Register provoked/expected warning.

Parameters:
warning provoked/expected warning to register

Definition at line 63 of file ProvokedWarningRegistry.cpp.

void ProvokedWarningRegistry::SetWarningAsDetected ( const ProvokedWarning warning  )  [virtual]

Set provoked/expected warning to has been detected.

Parameters:
warning detected provoked/expected warning

Definition at line 122 of file ProvokedWarningRegistry.cpp.

Referenced by wxTst::WxGuiTestHelper::IsProvokedWarning().

void ProvokedWarningRegistry::UnregisterWarning ( const ProvokedWarning warning  )  [virtual]

Unregister and remove provoked/expected warning from container.

Parameters:
warning provoked/expected warning to unregister

Definition at line 71 of file ProvokedWarningRegistry.cpp.

Referenced by ~ProvokedWarningRegistry().

bool ProvokedWarningRegistry::WasDetected ( const ProvokedWarning warning  )  const [virtual]

Check if this provoked/expected warning was detected.

Parameters:
warning provoked/expected warning to check for detection
Returns:
true, if warning was detected within specified time out interval

Definition at line 105 of file ProvokedWarningRegistry.cpp.


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

wxWidgets Logo Get wxGuiTesting at SourceForge.net. Fast, secure and Free Open Source software downloads
Generated on Tue Mar 17 17:29:30 2009 for wxGuiTesting by doxygen 1.5.5