25 #ifndef WSUBJECT_TEST_H
26 #define WSUBJECT_TEST_H
31 #include <cxxtest/TestSuite.h>
33 #include "../WDataSet.h"
34 #include "../WSubject.h"
47 TS_ASSERT_THROWS_NOTHING(
WSubject() );
56 TS_ASSERT_THROWS_NOTHING(
WSubject subject( testInfo ) );
87 std::shared_ptr< WDataSet > dummyDataSet;
88 dummyDataSet = std::shared_ptr< WDataSet >(
new WDataSet );
89 std::string filename =
"Hallo";
90 dummyDataSet->setFilename( filename );
102 TS_ASSERT_EQUALS( filename, ( *iter )->getFilename() );
103 TS_ASSERT_EQUALS( dummyDataSet, ( *iter ) );
106 TS_ASSERT( count == 1 );
114 std::shared_ptr< WDataSet > dummyDataSet;
115 dummyDataSet = std::shared_ptr< WDataSet >(
new WDataSet );
116 std::string filename =
"Hallo";
117 dummyDataSet->setFilename( filename );
Base class for all data set types.
std::shared_ptr< WSharedObjectTicketRead< T > > ReadTicket
Type for read tickets.
size_t size() const
The size of the container.
The tests for our subject class.
void testGetNumberOfDataSet()
Test getting number of datasets.
void testGetName()
Test whether we can retrieve the right info with getName function.
void TestConstructorWithInfo()
Test whether we have put the info where it belongs and intialized the rest.
void testInstantiation(void)
Test instantiation of objects of WSubject class.
void testAddGetDataSet()
Test adding and iterating of data sets.
void testInstantiationWithName(void)
Test instantiation of objects of WSubject class with name.
Container for all WDataSets belonging to one subject or patient.
DatasetSharedContainerType m_datasets
A container for all WDataSet.
DatasetContainerType::const_iterator DatasetConstIterator
The dataset const iterator.
DatasetSharedContainerType::ReadTicket getDatasets() const
Returns read-access to the dataset list.
WPersonalInformation m_personalInfo
Information on the person represented by this WSubject.
std::string getName() const
Returns the name of the subject.
void addDataSet(std::shared_ptr< WDataSet > dataset)
Insert a new dataset referenced by a pointer.