62 std::string testDataPath = GetTestDataFilePath(
"IGT-Data/SimpleIGTStorage.storage");
63 mitk::NavigationToolStorage::Pointer readStorage = m_Deserializer->Deserialize(testDataPath);
64 CPPUNIT_ASSERT_MESSAGE(
"Testing deserialization of simple tool storage",readStorage.IsNotNull());
65 CPPUNIT_ASSERT_MESSAGE(
" ..Testing number of tools in storage",readStorage->GetToolCount()==3);
67 bool foundtool1 =
false;
68 bool foundtool2 =
false;
69 bool foundtool3 =
false;
70 for(
int i=0; i<3; i++)
72 if ((readStorage->GetTool(i)->GetIdentifier()==
"001")) foundtool1 =
true;
73 else if ((readStorage->GetTool(i)->GetIdentifier()==
"002")) foundtool2 =
true;
74 else if ((readStorage->GetTool(i)->GetIdentifier()==
"003")) foundtool3 =
true;
76 CPPUNIT_ASSERT_MESSAGE(
" ..Testing if tool 1 was loaded successfully",foundtool1);
77 CPPUNIT_ASSERT_MESSAGE(
" ..Testing if tool 2 was loaded successfully",foundtool2);
78 CPPUNIT_ASSERT_MESSAGE(
" ..Testing if tool 3 was loaded successfully",foundtool3);
83 std::string testDataPath = GetTestDataFilePath(
"IGT-Data/ComplexIGTStorage.storage");
84 mitk::NavigationToolStorage::Pointer readStorage = m_Deserializer->Deserialize(testDataPath);
85 CPPUNIT_ASSERT_MESSAGE(
"Testing deserialization of complex tool storage",readStorage.IsNotNull());
86 CPPUNIT_ASSERT_MESSAGE(
" ..Testing number of tools in storage",readStorage->GetToolCount()==2);