Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkConcreteModelFactoryBaseTest.cpp
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #include <iostream>
14 #include "mitkTestingMacros.h"
15 
16 #include "mitkTestModel.h"
17 #include "mitkTestModelFactory.h"
18 #include "mitkModelFitException.h"
19 
20 
21 int mitkConcreteModelFactoryBaseTest(int /*argc*/, char*[] /*argv[]*/)
22 {
23  MITK_TEST_BEGIN("mitkConcreteModelFactoryBaseTest")
24 
25  mitk::TestModelFactory::Pointer factory = mitk::TestModelFactory::New();
27 
28  //check pass through of model properties.
29 
30  MITK_TEST_CONDITION_REQUIRED(factory->GetParameterNames() == refModel->GetParameterNames(),
31  "Testing if GetParameterNames is successfully passed through.");
32  MITK_TEST_CONDITION_REQUIRED(factory->GetNumberOfParameters() == refModel->GetNumberOfParameters(),
33  "Testing if GetNumberOfParameters is successfully passed through.");
34  MITK_TEST_CONDITION_REQUIRED(factory->GetParameterScales() == refModel->GetParameterScales(),
35  "Testing if GetParameterScales is successfully passed through.");
36  MITK_TEST_CONDITION_REQUIRED(factory->GetParameterUnits() == refModel->GetParameterUnits(),
37  "Testing if GetParameterUnits is successfully passed through.");
38  MITK_TEST_CONDITION_REQUIRED(factory->GetDerivedParameterNames() ==
39  refModel->GetDerivedParameterNames(),
40  "Testing if GetDerivedParameterNames is successfully passed through.");
41  MITK_TEST_CONDITION_REQUIRED(factory->GetNumberOfDerivedParameters() ==
42  refModel->GetNumberOfDerivedParameters(),
43  "Testing if GetNumberOfDerivedParameters is successfully passed through.");
44  MITK_TEST_CONDITION_REQUIRED(factory->GetDerivedParameterScales() ==
45  refModel->GetDerivedParameterScales(),
46  "Testing if GetDerivedParameterScales is successfully passed through.");
47  MITK_TEST_CONDITION_REQUIRED(factory->GetDerivedParameterUnits() ==
48  refModel->GetDerivedParameterUnits(),
49  "Testing if GetDerivedParameterUnits is successfully passed through.");
50  MITK_TEST_CONDITION_REQUIRED(factory->GetModelDisplayName() == refModel->GetModelDisplayName(),
51  "Testing if GetModelDisplayName is successfully passed through.");
52  MITK_TEST_CONDITION_REQUIRED(factory->GetModelType() == refModel->GetModelType(),
53  "Testing if GetModelType is successfully passed through.");
54  MITK_TEST_CONDITION_REQUIRED(factory->GetFunctionString() == refModel->GetFunctionString(),
55  "Testing if GetFunctionString is successfully passed through.");
56  MITK_TEST_CONDITION_REQUIRED(factory->GetClassID() == refModel->GetClassID(),
57  "Testing if GetClassID is successfully passed through.");
58  MITK_TEST_CONDITION_REQUIRED(factory->GetXName() == refModel->GetXName(),
59  "Testing if GetXName is successfully passed through.");
60  MITK_TEST_CONDITION_REQUIRED(factory->GetXAxisName() == refModel->GetXAxisName(),
61  "Testing if GetXAxisName is successfully passed through.");
62  MITK_TEST_CONDITION_REQUIRED(factory->GetXAxisUnit() == refModel->GetXAxisUnit(),
63  "Testing if GetXAxisUnit is successfully passed through.");
64  MITK_TEST_CONDITION_REQUIRED(factory->GetYAxisName() == refModel->GetYAxisName(),
65  "Testing if GetYAxisName is successfully passed through.");
66  MITK_TEST_CONDITION_REQUIRED(factory->GetYAxisUnit() == refModel->GetYAxisUnit(),
67  "Testing if GetYAxisUnit is successfully passed through.");
68 
70 }
static Pointer New()
#define MITK_TEST_CONDITION_REQUIRED(COND, MSG)
static Pointer New()
section GeneralTestsDeprecatedOldTestingStyle Deprecated macros All tests with MITK_TEST_BEGIN()
int mitkConcreteModelFactoryBaseTest(int, char *[])
and MITK_TEST_END()