25 #ifndef WSUBJECT_TEST_H
26 #define WSUBJECT_TEST_H
29 #include <cxxtest/TestSuite.h>
31 #include "../WSubject.h"
32 #include "../WDataSet.h"
45 TS_ASSERT_THROWS_NOTHING(
WSubject() );
54 TS_ASSERT_THROWS_NOTHING(
WSubject( testInfo ) );
85 boost::shared_ptr< WDataSet > dummyDataSet;
86 dummyDataSet = boost::shared_ptr< WDataSet >(
new WDataSet );
87 std::string filename =
"Hallo";
88 dummyDataSet->setFilename( filename );
100 TS_ASSERT_EQUALS( filename, ( *iter )->getFilename() );
101 TS_ASSERT_EQUALS( dummyDataSet, ( *iter ) );
104 TS_ASSERT( count == 1 );
112 boost::shared_ptr< WDataSet > dummyDataSet;
113 dummyDataSet = boost::shared_ptr< WDataSet >(
new WDataSet );
114 std::string filename =
"Hallo";
115 dummyDataSet->setFilename( filename );
128 #endif // WSUBJECT_TEST_H
void testInstantiationWithName(void)
Test instantiation of objects of WSubject class with name.
WPersonalInformation m_personalInfo
Information on the person represented by this WSubject.
DatasetSharedContainerType m_datasets
A container for all WDataSet.
The tests for our subject class.
Base class for all data set types.
std::string getName() const
Returns the name of the subject.
Container for all WDataSets belonging to one subject or patient.
size_t size() const
The size of the container.
void addDataSet(boost::shared_ptr< WDataSet > dataset)
Insert a new dataset referenced by a pointer.
DatasetContainerType::const_iterator DatasetConstIterator
The dataset const iterator.
DatasetSharedContainerType::ReadTicket getDatasets() const
Returns read-access to the dataset list.
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 testGetNumberOfDataSet()
Test getting number of datasets.
void testInstantiation(void)
Test instantiation of objects of WSubject class.
boost::shared_ptr< WSharedObjectTicketRead< DatasetContainerType > > ReadTicket
Type for read tickets.
void testAddGetDataSet()
Test adding and iterating of data sets.