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

Function frame018a

Modules/CppMicroServices/test/usModuleTest.cpp:130–143  ·  view source on GitHub ↗

---------------------------------------------------------------------------- Test result of GetService(ServiceReference()). Should throw std::invalid_argument

Source from the content-addressed store, hash-verified

128//----------------------------------------------------------------------------
129//Test result of GetService(ServiceReference()). Should throw std::invalid_argument
130void frame018a(ModuleContext* mc)
131{
132 try
133 {
134 mc->GetService(ServiceReferenceU());
135 US_TEST_FAILED_MSG(<< "Got service object, expected std::invalid_argument exception")
136 }
137 catch (const std::invalid_argument& )
138 {}
139 catch (...)
140 {
141 US_TEST_FAILED_MSG(<< "Got wrong exception, expected std::invalid_argument")
142 }
143}
144
145// Load libA and check that it exists and that the service it registers exists,
146// also check that the expected events occur and that the storage paths are correct

Callers 1

usModuleTestFunction · 0.85

Calls 1

GetServiceMethod · 0.45

Tested by

no test coverage detected