MCPcopy Create free account
hub / github.com/MITK/MITK / CheckData

Method CheckData

Modules/Chart/Test/mitkChartExampleTest.cpp:91–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 13

GetDataOneMethod · 0.80
GetXDataMethod · 0.80
GetYDataMethod · 0.80
GetChartTypeMethod · 0.80
GetLineStyleMethod · 0.80
GetDataElementByLabelMethod · 0.80
GetDataTwoMethod · 0.80
GetDataThreeMethod · 0.80
GetDataFourMethod · 0.80
GetDataFiveMethod · 0.80
GetLabelMethod · 0.45
GetColorMethod · 0.45

Tested by

no test coverage detected