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

Method testInitialize

Modules/Core/test/mitkMaterialTest.cpp:206–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204 }
205
206 void testInitialize()
207 {
208 mitk::Material::Color color;
209 color.Set(0, 0, 0);
210 double opacity = 1.0f;
211 double rgb = 0;
212 double colorCoefficient = 0;
213 double specularCoefficient = 0;
214 double specularPower = 0;
215
216 myMP = mitk::Material::New(rgb, rgb, rgb, colorCoefficient, specularCoefficient, specularPower, opacity);
217 double lineWidth = 1;
218 myMP->SetLineWidth(lineWidth);
219 mitk::Material::RepresentationType representation = mitk::Material::Wireframe;
220 myMP->SetRepresentation(representation);
221 mitk::Material::InterpolationType interpolation = mitk::Material::Flat;
222 myMP->SetInterpolation(interpolation);
223 myMP->SetSpecularColor(color);
224 std::string name = "Hans Wurst";
225 myMP->SetName(name);
226 mitk::Material::Pointer myMP2 = mitk::Material::New();
227 myMP2->Initialize(*myMP);
228 MITK_TEST_CONDITION(*myMP == *myMP2, "testing equality after .Initialize")
229 }
230 void testOperatorequality()
231 {
232 {

Callers 1

mitkMaterialTestFunction · 0.80

Calls 8

SetRepresentationMethod · 0.80
SetSpecularColorMethod · 0.80
NewFunction · 0.50
SetMethod · 0.45
SetLineWidthMethod · 0.45
SetInterpolationMethod · 0.45
SetNameMethod · 0.45
InitializeMethod · 0.45

Tested by

no test coverage detected