31 CPPUNIT_TEST_SUITE(QmitkDataStorageListModelTestSuite);
34 CPPUNIT_TEST_SUITE_END();
44 imageNode->SetData(image);
48 surfaceNode->SetData(surface);
50 m_DataStorage->Add(imageNode);
51 m_DataStorage->Add(surfaceNode);
54 void tearDown()
override {}
56 void InstantiationTest()
59 CPPUNIT_ASSERT_EQUAL(0, emptyModel.
rowCount());
62 CPPUNIT_ASSERT_EQUAL(2, unfilteredModel.rowCount());
67 CPPUNIT_ASSERT_EQUAL(1, imageFilteredModel.rowCount());
74 void FlexibleInputTest()
77 CPPUNIT_ASSERT_EQUAL(0, model.
rowCount());
78 CPPUNIT_ASSERT_EQUAL(std::size_t(0), model.
GetDataNodes().size());
84 CPPUNIT_ASSERT_EQUAL(0, model.
rowCount());
85 CPPUNIT_ASSERT_EQUAL(std::size_t(0), model.
GetDataNodes().size());
88 CPPUNIT_ASSERT_EQUAL(1, model.
rowCount());
89 CPPUNIT_ASSERT_EQUAL(std::size_t(1), model.
GetDataNodes().size());
92 CPPUNIT_ASSERT_EQUAL(2, model.
rowCount());
93 CPPUNIT_ASSERT_EQUAL(std::size_t(2), model.
GetDataNodes().size());
96 CPPUNIT_ASSERT_EQUAL(0, model.
rowCount());
97 CPPUNIT_ASSERT_EQUAL(std::size_t(0), model.
GetDataNodes().size());
MITK_TEST_SUITE_REGISTRATION(mitkImageToItk)
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Implements QAbstractListModel.
#define MITK_TEST(TESTMETHOD)
Adds a test to the current test suite.
void SetPredicate(mitk::NodePredicateBase *pred)
Change the filter predicate.
void SetDataStorage(mitk::DataStorage::Pointer dataStorage)
Change the data storage to represent.
mitk::DataStorage::Pointer m_DataStorage
Test fixture for parameterized tests.
std::vector< mitk::DataNode * > GetDataNodes() const
Get all current data nodes.