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
Agree with Aleha that using a testSettings.json configuration file is probably better.
And then, instead of injecting the IOption
var builder = new ConfigurationBuilder()
.AddJsonFile("testSettings.json", true, true)
.AddEnvironmentVariables();
var configurationRoot = builder.Build();
configurationRoot.GetSection("SampleRepo").Bind(_sampleRepo);