I know this is an old question, but I thought I would add my solution as my easiest and could help someone.
The created settings class is a partial class, we can use it to create our own implementation of Default.
Create a new file in the Properties folder
internal partial class Settings : ISettings { private static ISettings _setInstance; internal static ISettings Get { get { return _setInstance = _setInstance ?? Default; } set { _setInstance = value; } } }
Then, when we use it elsewhere in the application, we can call Settings.Get .. If you want to set the values from the test, create a class that inherits from ISettings and install a new implementation.
If your tests are found in a separate project, you will need to add another class to publish it. We cannot change the settings file to public, because it will simply be overwritten the next time you change or add a value.
source share