// private readonly Mock<SiteSetting> mockSetting; public SiteSettingTest() { mockReadConfig = new Mock <IReadConfig>(); SettingFac <SiteSetting> .UpdateOrAddReadConfig(mockReadConfig.Object); mockReadConfig.Setup(q => q.Get("Test1", typeof(int))).Returns(32); mockReadConfig.Setup(q => q.Get("Test2", typeof(bool))).Returns(true); mockReadConfig.Setup(q => q.Get("Test3", typeof(string))).Returns("Test3"); mockReadConfig.Setup(q => q.Get("Switch1", typeof(string))).Returns("HPN,GPG;APW"); mockReadConfig.Setup(q => q.Get("Switch2", typeof(string))).Returns("HPN,GPG;APW"); }
public static DataSetting GetSetting(string site) { return(SettingFac <DataSetting> .GetSetting(site)); }
public static void GetOrUpdateSetting(string site) { SettingFac <DataSetting> .GetOrUpdateSetting(site); }
public static bool UpdateOrAddReadConfig(IReadConfig readConfig) { return(SettingFac <DataSetting> .UpdateOrAddReadConfig(readConfig)); }
public static SiteSetting GetSetting(string site) { return(SettingFac <SiteSetting> .GetSetting(site)); }