我希望能够在整个应用程序中使用Settings类,但是我仍然希望能够测试设置对象的填充。大多数设置来自注册表。自定义应用程序设置
目前我有这个,但我不知道在哪里填充,以便我可以嘲笑用于填充它的服务。
public class Program {
public static Settings SystemSettings = new SystemSettings();
public void Main(string[] args) {
SystemSettings = new RegistryService().GetRegSettings();
}
}
对此的任何想法都会很棒。