| 89 | } |
| 90 | |
| 91 | void CheckData() |
| 92 | { |
| 93 | auto myDataOne = helper->GetDataOne(); |
| 94 | |
| 95 | auto xDataOne = myDataOne->GetXData(); |
| 96 | auto yDataOne = myDataOne->GetYData(); |
| 97 | auto labelOne = myDataOne->GetLabel(); |
| 98 | auto typeOne = myDataOne->GetChartType(); |
| 99 | auto colorOne = myDataOne->GetColor(); |
| 100 | auto styleOne = myDataOne->GetLineStyle(); |
| 101 | |
| 102 | auto dataToCheckOne = helper->qmitkChartWidget.GetDataElementByLabel(labelOne.toString().toStdString()); |
| 103 | |
| 104 | CPPUNIT_ASSERT_MESSAGE("Dataset one was not saved correctly", dataToCheckOne->GetXData() == xDataOne && |
| 105 | dataToCheckOne->GetYData() == yDataOne && |
| 106 | dataToCheckOne->GetLabel() == labelOne && |
| 107 | dataToCheckOne->GetChartType() == typeOne && |
| 108 | dataToCheckOne->GetColor() == colorOne && |
| 109 | dataToCheckOne->GetLineStyle() == styleOne); |
| 110 | |
| 111 | auto myDataTwo = helper->GetDataTwo(); |
| 112 | |
| 113 | auto xDataTwo = myDataTwo->GetXData(); |
| 114 | auto yDataTwo = myDataTwo->GetYData(); |
| 115 | auto labelTwo = myDataTwo->GetLabel(); |
| 116 | auto typeTwo = myDataTwo->GetChartType(); |
| 117 | auto colorTwo = myDataTwo->GetColor(); |
| 118 | auto styleTwo = myDataTwo->GetLineStyle(); |
| 119 | |
| 120 | auto dataToCheckTwo = helper->qmitkChartWidget.GetDataElementByLabel(labelTwo.toString().toStdString()); |
| 121 | |
| 122 | CPPUNIT_ASSERT_MESSAGE("Dataset two was not saved correctly", dataToCheckTwo->GetXData() == xDataTwo && |
| 123 | dataToCheckTwo->GetYData() == yDataTwo && |
| 124 | dataToCheckTwo->GetLabel() == labelTwo && |
| 125 | dataToCheckTwo->GetChartType() == typeTwo && |
| 126 | dataToCheckTwo->GetColor() == colorTwo && |
| 127 | dataToCheckTwo->GetLineStyle() == styleTwo); |
| 128 | |
| 129 | auto myDataThree = helper->GetDataThree(); |
| 130 | |
| 131 | auto xDataThree = myDataThree->GetXData(); |
| 132 | auto yDataThree = myDataThree->GetYData(); |
| 133 | auto labelThree = myDataThree->GetLabel(); |
| 134 | auto typeThree = myDataThree->GetChartType(); |
| 135 | auto colorThree = myDataThree->GetColor(); |
| 136 | auto styleThree = myDataThree->GetLineStyle(); |
| 137 | |
| 138 | auto dataToCheckThree = helper->qmitkChartWidget.GetDataElementByLabel(labelThree.toString().toStdString()); |
| 139 | |
| 140 | CPPUNIT_ASSERT_MESSAGE("Dataset three was not saved correctly", dataToCheckThree->GetXData() == xDataThree && |
| 141 | dataToCheckThree->GetYData() == yDataThree && |
| 142 | dataToCheckThree->GetLabel() == labelThree && |
| 143 | dataToCheckThree->GetChartType() == typeThree && |
| 144 | dataToCheckThree->GetColor() == colorThree && |
| 145 | dataToCheckThree->GetLineStyle() == styleThree); |
| 146 | |
| 147 | auto myDataFour = helper->GetDataFour(); |
| 148 |
nothing calls this directly
no test coverage detected