Esempio n. 1
0
        // 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");
        }
Esempio n. 2
0
 public static bool UpdateOrAddReadConfig(IReadConfig readConfig)
 {
     return(SettingFac <DataSetting> .UpdateOrAddReadConfig(readConfig));
 }