CSharp:Using IOptions as a parameter for unittesting: Difference between revisions

From Devguid
No edit summary
No edit summary
 
Line 1: Line 1:


<syntax>
<syntaxhighlight>
var optionsConfig = Options.Create(TestCommon.GetConfig().GetSection("ConfigToTest").Get<ConfigToTest>());
var optionsConfig = Options.Create(TestCommon.GetConfig().GetSection("ConfigToTest").Get<ConfigToTest>());
</syntax>
 
</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]] [[Unittesting]]
[[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