Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::TestManager Class Reference

Manages the counting of passed and failed sub-tests within a test run. More...

#include <mitkTestManager.h>

Public Member Functions

 TestManager ()
 
void Initialize ()
 Must be called at the beginning of a test run to reset all counters. More...
 
int NumberOfFailedTests ()
 Return the number of failed sub-tests. More...
 
int NumberOfPassedTests ()
 Return the number of passed sub-tests. More...
 
void TestFailed ()
 Tell the manager that a sub-test has failed. Increments the failure counter. More...
 
void TestPassed ()
 Tell the manager that a sub-test has passed. Increments the pass counter. More...
 
virtual ~TestManager ()
 

Static Public Member Functions

static TestManager * GetInstance ()
 Return the singleton instance of the TestManager. More...
 

Protected Attributes

int m_FailedTests
 
int m_PassedTests
 

Detailed Description

Manages the counting of passed and failed sub-tests within a test run.

This singleton class tracks the number of passed and failed sub-tests. Call Initialize() at the beginning of a test run to reset the counters.

Definition at line 26 of file mitkTestManager.h.

Constructor & Destructor Documentation

◆ TestManager()

mitk::TestManager::TestManager ( )
inline

Definition at line 29 of file mitkTestManager.h.

◆ ~TestManager()

virtual mitk::TestManager::~TestManager ( )
inlinevirtual

Definition at line 58 of file mitkTestManager.h.

Member Function Documentation

◆ GetInstance()

static TestManager* mitk::TestManager::GetInstance ( )
static

Return the singleton instance of the TestManager.

Returns
Pointer to the global TestManager instance.

◆ Initialize()

void mitk::TestManager::Initialize ( )

Must be called at the beginning of a test run to reset all counters.

◆ NumberOfFailedTests()

int mitk::TestManager::NumberOfFailedTests ( )

Return the number of failed sub-tests.

Returns
The count of failed sub-tests since the last Initialize() call.

◆ NumberOfPassedTests()

int mitk::TestManager::NumberOfPassedTests ( )

Return the number of passed sub-tests.

Returns
The count of passed sub-tests since the last Initialize() call.

◆ TestFailed()

void mitk::TestManager::TestFailed ( )

Tell the manager that a sub-test has failed. Increments the failure counter.

◆ TestPassed()

void mitk::TestManager::TestPassed ( )

Tell the manager that a sub-test has passed. Increments the pass counter.

Member Data Documentation

◆ m_FailedTests

int mitk::TestManager::m_FailedTests
protected

Definition at line 61 of file mitkTestManager.h.

◆ m_PassedTests

int mitk::TestManager::m_PassedTests
protected

Definition at line 62 of file mitkTestManager.h.


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