29 MITK_INFO <<
"Creating a base data instance...";
33 MITK_TEST_CONDITION(baseDataImpl->IsInitialized(),
"BaseDataTestImplementation is initialized");
34 MITK_TEST_CONDITION(baseDataImpl->IsEmpty(),
"BaseDataTestImplementation is initialized and empty");
38 MITK_TEST_CONDITION(cloneBaseData->IsInitialized(),
"Clone of BaseDataTestImplementation is initialized");
39 MITK_TEST_CONDITION(cloneBaseData->IsEmpty(),
"Clone of BaseDataTestImplementation is initialized and empty");
41 MITK_INFO <<
"Testing setter and getter for geometries...";
47 baseDataImpl->SetTimeGeometry(geo);
52 baseDataImpl->SetTimeGeometry(geo2);
54 MITK_TEST_CONDITION(baseDataImpl->GetTimeGeometry() == geo2.GetPointer(),
"Correct Reinit of TimeGeometry");
60 baseDataImpl->Expand(5);
61 MITK_TEST_CONDITION(baseDataImpl->GetTimeSteps() == 5,
"Expand the geometry to further time slices!");
68 if (timeGeometry.IsNotNull())
70 timeGeometry->SetTimeStepGeometry(geo3, 1);
73 MITK_TEST_CONDITION(baseDataImpl->GetUpdatedGeometry(1) == geo3,
"Set Geometry for time step 1");
75 baseDataImpl->SetClonedGeometry(geo3, 1);
82 baseDataImpl->SetOrigin(p3d);
85 MITK_TEST_CONDITION(baseDataImpl->GetGeometry(1)->GetOrigin() == geo3->GetOrigin(),
"Testing Origin set");
87 cloneBaseData = baseDataImpl->Clone();
88 MITK_TEST_CONDITION(cloneBaseData->GetGeometry(1)->GetOrigin() == geo3->GetOrigin(),
"Testing origin set in clone!");
91 baseDataImpl->Clear();
96 MITK_TEST_CONDITION(baseDataImpl->GetProperty(
"property38")->GetValueAsString() ==
"testproperty",
97 "Check if base property is set correctly!");
99 cloneBaseData = baseDataImpl->Clone();
100 MITK_TEST_CONDITION(cloneBaseData->GetProperty(
"property38")->GetValueAsString() ==
"testproperty",
101 "Testing origin set in clone!");
105 propertyList->SetFloatProperty(
"floatProperty1", 123.45);
106 propertyList->SetBoolProperty(
"visibility",
true);
107 propertyList->SetStringProperty(
"nameXY",
"propertyName");
108 baseDataImpl->SetPropertyList(propertyList);
110 MITK_TEST_CONDITION(baseDataImpl->GetPropertyList() == propertyList,
"Check if base property list is set correctly!");
111 MITK_TEST_CONDITION(baseDataImpl->GetPropertyList()->GetBoolProperty(
"visibility", value) ==
true,
112 "Check if base property is set correctly in the property list!");
115 baseDataImpl->UpdateOutputInformation();
116 MITK_TEST_CONDITION(baseDataImpl->GetUpdatedTimeGeometry() == geo2,
"TimeGeometry update!");
119 newBaseData->CopyInformation(baseDataImpl);
121 "Check copying of of Basedata Data Object!");
#define MITK_TEST_CONDITION_REQUIRED(COND, MSG)
int mitkBaseDataTest(int, char *[])
section GeneralTestsDeprecatedOldTestingStyle Deprecated macros All tests with MITK_TEST_BEGIN()
#define MITK_TEST_CONDITION(COND, MSG)
BaseGeometry Describes the geometry of a data object.