CSharp:Using IOptions as a parameter for unittesting: Difference between revisions
From Devguid
(Created page with " <syntax> var optionsConfig = Options.Create(TestCommon.GetConfig().GetSection("ConfigToTest").Get<ConfigToTest>()); </syntax> https://stackoverflow.com/questions/40876507/net-core-unit-testing-mock-ioptionst") |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
< | <syntaxhighlight> | ||
var optionsConfig = Options.Create(TestCommon.GetConfig().GetSection("ConfigToTest").Get<ConfigToTest>()); | var optionsConfig = Options.Create(TestCommon.GetConfig().GetSection("ConfigToTest").Get<ConfigToTest>()); | ||
</ | |||
</syntaxhighlight> | |||
https://stackoverflow.com/questions/40876507/net-core-unit-testing-mock-ioptionst | https://stackoverflow.com/questions/40876507/net-core-unit-testing-mock-ioptionst | ||
[[Category:CSharp]] [[Category:DotNet]] [[Category:Unittesting]] |
Latest revision as of 23:06, 12 April 2023
var optionsConfig = Options.Create(TestCommon.GetConfig().GetSection("ConfigToTest").Get<ConfigToTest>());
https://stackoverflow.com/questions/40876507/net-core-unit-testing-mock-ioptionst