Medical Imaging Interaction Toolkit  2018.4.99-1bab67a2
Medical Imaging Interaction Toolkit
mitkAnnotationTest.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 #include <mitkCommon.h>
13 #include <mitkIOUtil.h>
14 #include <mitkTestFixture.h>
15 #include <mitkTestingMacros.h>
16 #include <usGetModuleContext.h>
17 #include <usModuleContext.h>
18 #include <usServiceReference.h>
19 
22 
23 class mitkAnnotationTestSuite : public mitk::TestFixture
24 {
25  CPPUNIT_TEST_SUITE(mitkAnnotationTestSuite);
26  MITK_TEST(AnnotationUtilsTest);
27  CPPUNIT_TEST_SUITE_END();
28 
29 private:
30 public:
31  void setUp() override {}
32  void AnnotationUtilsTest()
33  {
35  CPPUNIT_ASSERT_MESSAGE("Testing availability of ManualPlacementAnnotationRenderer service", ap1_test1);
37  CPPUNIT_ASSERT_MESSAGE("Testing if ManualPlacementAnnotationRenderer of same kind stays avaliable", ap1_test1 == ap2_test1);
39  CPPUNIT_ASSERT_MESSAGE("Testing if new instance can be created by using different ID", ap1_test2 != ap1_test1);
40 
42  CPPUNIT_ASSERT_MESSAGE("Testing availability of LayoutAnnotationRenderer service", ol1_test1);
44  CPPUNIT_ASSERT_MESSAGE("Testing if LayoutAnnotationRenderer of same kind stays avaliable", ol2_test1 == ol1_test1);
46  CPPUNIT_ASSERT_MESSAGE("Testing if new instance can be created by using different ID", ol1_test2 != ol1_test1);
47 
48  CPPUNIT_ASSERT_MESSAGE(
49  "Testing if LayoutAnnotationRenderer and ManualPlacementAnnotationRenderer services are different",
51  }
52 
53  void AnnotationTest() {}
54 };
55 MITK_TEST_SUITE_REGISTRATION(mitkAnnotation)
MITK_TEST_SUITE_REGISTRATION(mitkImageToItk)
The LayoutAnnotationRenderer is used for the layouted placement of mitk::Annotation Objects...
The ManualPlacementAnnotationRenderer is used for the simple placement of mitk::Annotation Objects...
#define MITK_TEST(TESTMETHOD)
Adds a test to the current test suite.
Test fixture for parameterized tests.
static ManualPlacementAnnotationRenderer * GetAnnotationRenderer(const std::string &rendererID)
Baseclass of Annotation layouters An AbstractAnnotationRenderer can be implemented to control a set o...
static LayoutAnnotationRenderer * GetAnnotationRenderer(const std::string &rendererID)