I feel like I\'m missing something really obvious here. I have classes that require injecting of options using the .NET Core IOptions pattern(?). When I unit te
Here's another easy way that doesn't need Mock, but instead uses the OptionsWrapper:
var myAppSettingsOptions = new MyAppSettingsOptions();
appSettingsOptions.MyObjects = new MyObject[]{new MyObject(){MyProp1 = "one", MyProp2 = "two", }};
var optionsWrapper = new OptionsWrapper(myAppSettingsOptions );
var myClassToTest = new MyClassToTest(optionsWrapper);