예제 #1
0
        public TestModel(ITestEngine testEngine, string applicationPrefix = null)
        {
            TestEngine       = testEngine;
            _settingsService = new SettingsService(true);
            _events          = new TestEventDispatcher(this);
            _assemblyWatcher = new AssemblyWatcher();

            _settingsService.LoadSettings();
            Settings    = new UserSettings(_settingsService, applicationPrefix);
            RecentFiles = new RecentFiles(_settingsService, applicationPrefix);

            Services = new TestServices(testEngine);

            foreach (var node in Services.ExtensionService.GetExtensionNodes(PROJECT_LOADER_EXTENSION_PATH))
            {
                if (node.TypeName == NUNIT_PROJECT_LOADER)
                {
                    NUnitProjectSupport = true;
                }
                else if (node.TypeName == VISUAL_STUDIO_PROJECT_LOADER)
                {
                    VisualStudioSupport = true;
                }
            }
        }
        public void CreateFile()
        {
            string tempDir = Path.GetTempPath();

            fileName     = Path.Combine(tempDir, "temp.txt");
            tempFileName = Path.Combine(tempDir, "newTempFile.txt");

            StreamWriter writer = new StreamWriter(fileName);

            writer.Write("Hello");
            writer.Close();

            handler = new CounterEventHandler();
            watcher = new AssemblyWatcher();
            watcher.Setup(watcherDelayMs, fileName);
            watcher.AssemblyChanged += new AssemblyChangedHandler(handler.OnChanged);
            watcher.Start();
        }
예제 #3
0
        public TestModel(ITestEngine testEngine)
        {
            TestEngine = testEngine;
            Services   = new TestServices(testEngine);

            foreach (var node in Services.ExtensionService.GetExtensionNodes(PROJECT_LOADER_EXTENSION_PATH))
            {
                if (node.TypeName == NUNIT_PROJECT_LOADER)
                {
                    NUnitProjectSupport = true;
                }
                else if (node.TypeName == VISUAL_STUDIO_PROJECT_LOADER)
                {
                    VisualStudioSupport = true;
                }
            }

            _events          = new TestEventDispatcher(this);
            _assemblyWatcher = new AssemblyWatcher();
        }