MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkUSProbeTest.cpp
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
13#include "mitkUSProbe.h"
14#include "mitkTestingMacros.h"
15
16
18{
19public:
20
21
22 static void TestInstantiation()
23 {
24 // let's create an object of our class
25 mitk::USProbe::Pointer probe = mitk::USProbe::New();
26 MITK_TEST_CONDITION_REQUIRED(probe.IsNotNull(), "USProbe should not be null after instantiation");
27 }
28
29 static void TestIsEqualToProbe()
30 {
31 mitk::USProbe::Pointer usSource = mitk::USProbe::New();
32 mitk::USProbe::Pointer probeA = mitk::USProbe::New();
33 mitk::USProbe::Pointer probeB = mitk::USProbe::New();
34 mitk::USProbe::Pointer probea = mitk::USProbe::New();
35 mitk::USProbe::Pointer identicalProbe = mitk::USProbe::New();
36 probeA->SetName("ProbeA");
37 probeB->SetName("ProbeB");
38 probea->SetName("Probea");
39 identicalProbe->SetName("ProbeA");
40 MITK_TEST_CONDITION_REQUIRED(! probeA->IsEqualToProbe(probeB), "ProbeA and probeB should not be equal");
41 MITK_TEST_CONDITION_REQUIRED(! probeA->IsEqualToProbe(probea), "ProbeA and probea should not be equal");
42 MITK_TEST_CONDITION_REQUIRED(probeA->IsEqualToProbe(identicalProbe), "ProbeA and probeA should be equal");
43 }
44
45
46
47};
48
52int mitkUSProbeTest(int /* argc */, char* /*argv*/[])
53{
54 MITK_TEST_BEGIN("mitkUSProbeTest");
55
58
59 MITK_TEST_END();
60}
static void TestIsEqualToProbe()
static void TestInstantiation()
int mitkUSProbeTest(int, char *[])