Esempio n. 1
0
        public void GlobalAppProgramParametersReadTest()
        {
            WfGlobalParameters settings = WfGlobalParameters.LoadProperties("ADMINISTRATION", "CONTRACT");

            settings.Properties.SetValue("AppName", "Seagull II");

            settings.Update();

            Thread.Sleep(500);

            WfGlobalParameters settingsLoaded = WfGlobalParameters.GetProperties("ADMINISTRATION", "CONTRACT");

            Assert.AreEqual(settings.Properties["AppName"].StringValue,
                            settingsLoaded.Properties["AppName"].StringValue);
        }
Esempio n. 2
0
        public void GlobalAppProgramParametersCaseInsensitiveReadTest()
        {
            WfGlobalParameters settings = WfGlobalParameters.GetProperties("ADMINISTRATION", "CONTRACT");

            settings.Properties.SetValue("AppName", "Seagull II");

            settings.Update();

            Thread.Sleep(500);

            WfGlobalParameters settingsLoaded = WfGlobalParameters.GetProperties("Administration", "Contract");

            //读两遍,仅用于确认Cache
            settingsLoaded = WfGlobalParameters.GetProperties("Administration", "CONTRACT");

            Assert.AreEqual(settings.Properties["AppName"].StringValue,
                            settingsLoaded.Properties["AppName"].StringValue);
        }