The Issue
You wish to unit test using the microsoft options Interface, but how do you inject you class into your test framework?
The solution
1 |
var options = Options.Create(new MyConfiguration() { Property = value}); |
That code will create an IOptions<MyConfiguration> class that you constructed.