Created
July 11, 2019 15:25
-
-
Save johnw86/f71c6f0cca84a8f34e281ac8f657c77a to your computer and use it in GitHub Desktop.
Unit tests with IConfiguration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myConfiguration = new Dictionary<string, string> | |
{ | |
{"Age", "18"}, | |
{"Nested:Property", "1"}, | |
}; | |
var configuration = new ConfigurationBuilder() | |
.AddInMemoryCollection(myConfiguration) | |
.Build(); | |
// Pass configuration in as IConfiguration. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment