MCPcopy Create free account
hub / github.com/OpenCppCoverage/OpenCppCoverage / TEST_F

Function TEST_F

ExporterTest/ExporterPluginManagerTest.cpp:126–151  ·  view source on GitHub ↗

-------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

124
125 //-------------------------------------------------------------------------
126 TEST_F(ExporterPluginManagerTest, CreateExportPluginDescriptions)
127 {
128 auto exportPlugin = CreateExportPluginMock();
129
130 const std::optional<std::wstring> argument = L"argument";
131 const std::wstring description = L"description";
132
133 EXPECT_CALL(*exportPlugin, GetArgumentHelpDescription())
134 .WillOnce(testing::Return(description));
135 EXPECT_CALL(*exportPlugin, CheckArgument(argument));
136
137 auto pluginManager = CreateManager(std::move(exportPlugin));
138 auto pluginDescriptions =
139 pluginManager->CreateExportPluginDescriptions();
140
141 ASSERT_EQ(1, pluginDescriptions.size());
142 const auto& pluginDescription = pluginDescriptions[0];
143
144 ASSERT_EQ(description, pluginDescription.GetParameterDescription());
145 ASSERT_EQ(pluginName_, pluginDescription.GetPluginName());
146 pluginDescription.CheckArgument(argument);
147
148 pluginManager.reset();
149 ASSERT_THROW(pluginDescription.CheckArgument(argument),
150 Exporter::ExporterException);
151 }
152
153 //-------------------------------------------------------------------------
154 TEST_F(ExporterPluginManagerTest, InvalidVersion)

Callers

nothing calls this directly

Calls 6

CheckArgumentFunction · 0.85
ASSERT_NO_THROWFunction · 0.85
ExportFunction · 0.85
CheckArgumentMethod · 0.45
ExportMethod · 0.45

Tested by

no test coverage detected