示例#1
0
 public void SetUp()
 {
     notifications               = 0;
     lastNotifiedValue           = false;
     builder                     = new MockGroupPolicyNotificationRegistrationBuilder();
     watcher                     = new GroupPolicyWatcher(builder);
     watcher.GroupPolicyUpdated += GroupPolicyUpdated;
 }
 public void SetUp()
 {
     AppDomain.CurrentDomain.SetData("APPBASE", Environment.CurrentDirectory);
     notifications               = 0;
     lastNotifiedValue           = false;
     builder                     = new MockGroupPolicyNotificationRegistrationBuilder();
     watcher                     = new GroupPolicyWatcher(builder);
     watcher.GroupPolicyUpdated += GroupPolicyUpdated;
 }
示例#3
0
        public void SetUp()
        {
            testConfigurationFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Other.config");
            ExeConfigurationFileMap configMap = new ExeConfigurationFileMap();

            configMap.ExeConfigFilename = testConfigurationFile;

            File.Copy(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile, testConfigurationFile, true);
            rwConfiguration = ConfigurationManager.OpenMappedExeConfiguration(configMap, ConfigurationUserLevel.None);

            policyRegistrationBuilder = new MockGroupPolicyNotificationRegistrationBuilder();
            groupPolicyWatcher        = new GroupPolicyWatcher(policyRegistrationBuilder);
            watcherCoordinator        = new ConfigurationChangeWatcherCoordinator(testConfigurationFile, false);
            notificationCoordinator   = new ConfigurationChangeNotificationCoordinator();

            valuesForNotifiedSections = new Dictionary <string, string>();
        }