Static Public Member Functions

mitkToolManagerTestClass Class Reference

List of all members.

Static Public Member Functions

static void TestToolManagerWithOutTools (mitk::ToolManager::Pointer toolManager)
static void TestToolManagerWithTools (mitk::ToolManager::Pointer toolManager)
static void TestSetterMethods (mitk::ToolManager::Pointer toolManager)

Detailed Description

Definition at line 24 of file mitkToolManagerTest.cpp.


Member Function Documentation

static void mitkToolManagerTestClass::TestSetterMethods ( mitk::ToolManager::Pointer  toolManager ) [inline, static]

Definition at line 43 of file mitkToolManagerTest.cpp.

References MITK_TEST_CONDITION, and mitk::DataNode::New().

Referenced by mitkToolManagerTest().

{
  MITK_TEST_CONDITION( toolManager->GetReferenceData().size() == 0, "Get reference data size (0)" )

  mitk::DataNode::Pointer nodeEmpty = mitk::DataNode::New();
  toolManager->SetReferenceData(nodeEmpty);
  MITK_TEST_CONDITION( toolManager->GetReferenceData().size() == 1, "Get reference data size (1)" )
  MITK_TEST_CONDITION( toolManager->GetReferenceData(0) == nodeEmpty, "Check if it is the right reference data" )
  MITK_TEST_CONDITION( toolManager->GetReferenceData()[0] == nodeEmpty, "Check if it is the right reference data vector" )
  
  mitk::DataNode::Pointer nodeEmpty2 = mitk::DataNode::New();
  toolManager->SetWorkingData(nodeEmpty2);
  MITK_TEST_CONDITION( toolManager->GetWorkingData().size() == 1, "Get working data size (1)" )
  MITK_TEST_CONDITION( toolManager->GetWorkingData(0) == nodeEmpty2, "Check if it is the right working data" )
  MITK_TEST_CONDITION( toolManager->GetWorkingData()[0] == nodeEmpty2, "Check if it is the right working data vector" )
}
static void mitkToolManagerTestClass::TestToolManagerWithOutTools ( mitk::ToolManager::Pointer  toolManager ) [inline, static]

Definition at line 26 of file mitkToolManagerTest.cpp.

References MITK_TEST_CONDITION.

{
  MITK_TEST_CONDITION( toolManager->GetTools().size() == 0, "Get empty tool list" )   
  MITK_TEST_CONDITION( toolManager->GetToolById(0) == NULL, "Get empty tool by id" )
}
static void mitkToolManagerTestClass::TestToolManagerWithTools ( mitk::ToolManager::Pointer  toolManager ) [inline, static]

Definition at line 32 of file mitkToolManagerTest.cpp.

References MITK_TEST_CONDITION.

Referenced by mitkToolManagerTest().

{
  MITK_TEST_CONDITION( toolManager->GetTools().size() > 0, "Get tool list with size 1" )
  MITK_TEST_CONDITION( toolManager->GetToolById(0) != NULL, "Test GetToolById() method" )
  MITK_TEST_CONDITION( toolManager->ActivateTool(0) == true, "Activate tool" )
  MITK_TEST_CONDITION( toolManager->GetActiveToolID() == 0, "Check for right tool id" )

  mitk::Tool* tool = toolManager->GetActiveTool();
  MITK_TEST_CONDITION( tool != NULL, "Check for right tool" )
}

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines