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

Function frame010a

Modules/CppMicroServices/test/usModuleTest.cpp:112–126  ·  view source on GitHub ↗

Get context id, location and status of the module

Source from the content-addressed store, hash-verified

110
111// Get context id, location and status of the module
112void frame010a(ModuleContext* mc)
113{
114 Module* m = mc->GetModule();
115
116 long int contextid = m->GetModuleId();
117
118 std::string location = m->GetLocation();
119 US_TEST_CONDITION(!location.empty(), "Test for non-empty module location")
120
121 US_TEST_CONDITION(m->IsLoaded(), "Test for loaded flag")
122
123 US_TEST_CONDITION(ModuleSettings::GetStoragePath().empty(), "Test for empty base storage path")
124 US_TEST_CONDITION(m->GetModuleContext()->GetDataFile("").empty(), "Test for empty data path")
125 US_TEST_CONDITION(m->GetModuleContext()->GetDataFile("bla").empty(), "Test for empty data file path")
126}
127
128//----------------------------------------------------------------------------
129//Test result of GetService(ServiceReference()). Should throw std::invalid_argument

Callers 1

usModuleTestFunction · 0.85

Calls 7

GetModuleIdMethod · 0.80
GetDataFileMethod · 0.80
GetModuleMethod · 0.45
GetLocationMethod · 0.45
emptyMethod · 0.45
IsLoadedMethod · 0.45
GetModuleContextMethod · 0.45

Tested by

no test coverage detected