public ProjectController(IProjectTreeModel projectTreeModel, IEventAggregator eventAggregator, IFileSystem fileSystem,
                                 IFileWatcher fileWatcher, IUnhandledExceptionPolicy unhandledExceptionPolicy, ITestProjectManager testProjectManager)
        {
            this.projectTreeModel         = projectTreeModel;
            this.eventAggregator          = eventAggregator;
            this.fileSystem               = fileSystem;
            this.fileWatcher              = fileWatcher;
            this.unhandledExceptionPolicy = unhandledExceptionPolicy;
            this.testProjectManager       = testProjectManager;

            TestFilters = new Observable <IList <FilterInfo> >(new List <FilterInfo>());
            TestFilters.PropertyChanged += (s, e) =>
            {
                if (updating)
                {
                    return;
                }

                projectTreeModel.TestProject.ClearTestFilters();
                GenericCollectionUtils.ForEach(TestFilters.Value, x =>
                                               projectTreeModel.TestProject.AddTestFilter(x));
            };

            fileWatcher.FileChangedEvent += delegate(string fullPath)
            {
                string fileName = Path.GetFileName(fullPath);
                EventHandlerPolicy.SafeInvoke(FileChanged, this, new FileChangedEventArgs(fileName));
            };
        }
 public void SetUp()
 {
     fileSystem               = MockRepository.GenerateStub <IFileSystem>();
     xmlSerializer            = MockRepository.GenerateStub <IXmlSerializer>();
     unhandledExceptionPolicy = MockRepository.GenerateStub <IUnhandledExceptionPolicy>();
     eventAggregator          = MockRepository.GenerateStub <IEventAggregator>();
     optionsController        = new OptionsController(fileSystem, xmlSerializer, unhandledExceptionPolicy, eventAggregator);
 }
Example #3
0
 ///<summary>
 /// Ctor.
 ///</summary>
 ///<param name="taskQueue">The task queue to use.</param>
 ///<param name="eventAggregator">An event aggregator.</param>
 ///<param name="unhandledExceptionPolicy">An exception policy.</param>
 public TaskRunner(ITaskQueue taskQueue, IEventAggregator eventAggregator,
                   IUnhandledExceptionPolicy unhandledExceptionPolicy)
 {
     this.taskQueue                = taskQueue;
     this.eventAggregator          = eventAggregator;
     this.unhandledExceptionPolicy = unhandledExceptionPolicy;
     currentWorkerTasks            = new LockBox <IDictionary <string, ThreadTask> >(new Dictionary <string, ThreadTask>());
 }
Example #4
0
 ///<summary>
 /// Ctor.
 ///</summary>
 ///<param name="taskQueue">The task queue to use.</param>
 ///<param name="eventAggregator">An event aggregator.</param>
 ///<param name="unhandledExceptionPolicy">An exception policy.</param>
 public TaskRunner(ITaskQueue taskQueue, IEventAggregator eventAggregator,
     IUnhandledExceptionPolicy unhandledExceptionPolicy)
 {
     this.taskQueue = taskQueue;
     this.eventAggregator = eventAggregator;
     this.unhandledExceptionPolicy = unhandledExceptionPolicy;
     currentWorkerTasks = new LockBox<IDictionary<string, ThreadTask>>(new Dictionary<string, ThreadTask>());
 }
 public void SetUp()
 {
     fileSystem = MockRepository.GenerateStub<IFileSystem>();
     xmlSerializer = MockRepository.GenerateStub<IXmlSerializer>();
     unhandledExceptionPolicy = MockRepository.GenerateStub<IUnhandledExceptionPolicy>();
     eventAggregator = MockRepository.GenerateStub<IEventAggregator>();
     optionsController = new OptionsController(fileSystem, xmlSerializer, unhandledExceptionPolicy, eventAggregator);
 }
Example #6
0
 public CopyCommand(string destinationFolder, string sourceFolder, IList<string> files, 
     IFileSystem fileSystem, IUnhandledExceptionPolicy unhandledExceptionPolicy)
 {
     this.destinationFolder = destinationFolder;
     this.sourceFolder = sourceFolder;
     this.files = files;
     this.fileSystem = fileSystem;
     this.unhandledExceptionPolicy = unhandledExceptionPolicy;
 }
 public CopyPluginsCommand(IList<IPluginDescriptor> sourcePlugins, string sourcePluginFolder, string targetPluginFolder, 
     IUnhandledExceptionPolicy exceptionPolicy, IFileSystem fileSystem)
 {
     this.sourcePlugins = sourcePlugins;
     this.sourcePluginFolder = sourcePluginFolder;
     this.targetPluginFolder = targetPluginFolder;
     this.exceptionPolicy = exceptionPolicy;
     this.fileSystem = fileSystem;
 }
 public CopyPluginsCommand(IList <IPluginDescriptor> sourcePlugins, string sourcePluginFolder, string targetPluginFolder,
                           IUnhandledExceptionPolicy exceptionPolicy, IFileSystem fileSystem)
 {
     this.sourcePlugins      = sourcePlugins;
     this.sourcePluginFolder = sourcePluginFolder;
     this.targetPluginFolder = targetPluginFolder;
     this.exceptionPolicy    = exceptionPolicy;
     this.fileSystem         = fileSystem;
 }
Example #9
0
 public CopyCommand(string destinationFolder, string sourceFolder, IList <string> files,
                    IFileSystem fileSystem, IUnhandledExceptionPolicy unhandledExceptionPolicy)
 {
     this.destinationFolder        = destinationFolder;
     this.sourceFolder             = sourceFolder;
     this.files                    = files;
     this.fileSystem               = fileSystem;
     this.unhandledExceptionPolicy = unhandledExceptionPolicy;
 }
 public void SetUp()
 {
     eventAggregator = MockRepository.GenerateStub<IEventAggregator>();
     fileSystem = MockRepository.GenerateStub<IFileSystem>();
     xmlSerializer = MockRepository.GenerateStub<IXmlSerializer>();
     unhandledExceptionPolicy = MockRepository.GenerateStub<IUnhandledExceptionPolicy>();
     
     controller = new ProjectUserOptionsController(eventAggregator, fileSystem, 
         xmlSerializer, unhandledExceptionPolicy);
 }
Example #11
0
        public void SetUp()
        {
            eventAggregator          = MockRepository.GenerateStub <IEventAggregator>();
            fileSystem               = MockRepository.GenerateStub <IFileSystem>();
            xmlSerializer            = MockRepository.GenerateStub <IXmlSerializer>();
            unhandledExceptionPolicy = MockRepository.GenerateStub <IUnhandledExceptionPolicy>();

            controller = new ProjectUserOptionsController(eventAggregator, fileSystem,
                                                          xmlSerializer, unhandledExceptionPolicy);
        }
        public ProjectUserOptionsController(IEventAggregator eventAggregator, IFileSystem fileSystem,
                                            IXmlSerializer xmlSerializer, IUnhandledExceptionPolicy unhandledExceptionPolicy)
        {
            this.eventAggregator          = eventAggregator;
            this.fileSystem               = fileSystem;
            this.xmlSerializer            = xmlSerializer;
            this.unhandledExceptionPolicy = unhandledExceptionPolicy;

            TreeViewCategory = UserOptions.DefaultTreeViewCategory;
            CollapsedNodes   = new List <string>();
        }
 public void SetUp()
 {
     projectTreeModel = MockRepository.GenerateStub<IProjectTreeModel>();
     fileSystem = MockRepository.GenerateStub<IFileSystem>();
     fileWatcher = MockRepository.GenerateStub<IFileWatcher>();
     unhandledExceptionPolicy = MockRepository.GenerateStub<IUnhandledExceptionPolicy>();
     eventAggregator = MockRepository.GenerateStub<IEventAggregator>();
     testProjectManager = MockRepository.GenerateStub<ITestProjectManager>();
     
     projectController = new ProjectController(projectTreeModel, eventAggregator, fileSystem, fileWatcher, 
         unhandledExceptionPolicy, testProjectManager);
 }
        public void SetUp()
        {
            projectTreeModel         = MockRepository.GenerateStub <IProjectTreeModel>();
            fileSystem               = MockRepository.GenerateStub <IFileSystem>();
            fileWatcher              = MockRepository.GenerateStub <IFileWatcher>();
            unhandledExceptionPolicy = MockRepository.GenerateStub <IUnhandledExceptionPolicy>();
            eventAggregator          = MockRepository.GenerateStub <IEventAggregator>();
            testProjectManager       = MockRepository.GenerateStub <ITestProjectManager>();

            projectController = new ProjectController(projectTreeModel, eventAggregator, fileSystem, fileWatcher,
                                                      unhandledExceptionPolicy, testProjectManager);
        }
 public void SetUp()
 {
     optionsController = MockRepository.GenerateStub<IOptionsController>();
     fileSystem = MockRepository.GenerateStub<IFileSystem>();
     taskManager = MockRepository.GenerateStub<ITaskManager>();
     testController = MockRepository.GenerateStub<ITestController>();
     projectController = MockRepository.GenerateStub<IProjectController>();
     unhandledExceptionPolicy = MockRepository.GenerateStub<IUnhandledExceptionPolicy>();
     eventAggregator = MockRepository.GenerateStub<IEventAggregator>();
     commandFactory = MockRepository.GenerateStub<ICommandFactory>();
     applicationController = new ApplicationController(optionsController,fileSystem,taskManager,testController,
                         projectController,unhandledExceptionPolicy,eventAggregator,commandFactory);
     command = MockRepository.GenerateStub<ICommand>();
 }
 public void SetUp()
 {
     optionsController        = MockRepository.GenerateStub <IOptionsController>();
     fileSystem               = MockRepository.GenerateStub <IFileSystem>();
     taskManager              = MockRepository.GenerateStub <ITaskManager>();
     testController           = MockRepository.GenerateStub <ITestController>();
     projectController        = MockRepository.GenerateStub <IProjectController>();
     unhandledExceptionPolicy = MockRepository.GenerateStub <IUnhandledExceptionPolicy>();
     eventAggregator          = MockRepository.GenerateStub <IEventAggregator>();
     commandFactory           = MockRepository.GenerateStub <ICommandFactory>();
     applicationController    = new ApplicationController(optionsController, fileSystem, taskManager, testController,
                                                          projectController, unhandledExceptionPolicy, eventAggregator, commandFactory);
     command = MockRepository.GenerateStub <ICommand>();
 }
Example #17
0
        public CopyController(ITaskManager taskManager, IFileSystem fileSystem, IUnhandledExceptionPolicy exceptionPolicy,
                              IEventAggregator eventAggregator)
        {
            this.taskManager     = taskManager;
            this.fileSystem      = fileSystem;
            this.exceptionPolicy = exceptionPolicy;
            this.eventAggregator = eventAggregator;

            SourcePluginFolder = new Observable <string>();
            TargetPluginFolder = new Observable <string>();

            SourcePlugins = new PluginTreeModel(fileSystem);
            TargetPlugins = new PluginTreeModel(fileSystem);
        }
Example #18
0
        public OptionsController(IFileSystem fileSystem, IXmlSerializer xmlSerializer,
                                 IUnhandledExceptionPolicy unhandledExceptionPolicy, IEventAggregator eventAggregator)
        {
            this.fileSystem               = fileSystem;
            this.xmlSerializer            = xmlSerializer;
            this.unhandledExceptionPolicy = unhandledExceptionPolicy;
            this.eventAggregator          = eventAggregator;

            TestRunnerFactory = new Observable <string>();
            TestRunnerFactory.PropertyChanged += (s, e) =>
                                                 settings.TestRunnerFactory = TestRunnerFactory.Value;

            SelectedTreeViewCategories = new Observable <IList <string> >();
            SelectedTreeViewCategories.PropertyChanged += (s, e) =>
                                                          settings.TreeViewCategories = new List <string>(SelectedTreeViewCategories.Value);

            UnselectedTreeViewCategories = new Observable <IList <string> >();

            Load();
        }
        // FIXME: too many dependencies!
        public ApplicationController(IOptionsController optionsController, IFileSystem fileSystem,
                                     ITaskManager taskManager, ITestController testController, IProjectController projectController,
                                     IUnhandledExceptionPolicy unhandledExceptionPolicy, IEventAggregator eventAggregator,
                                     ICommandFactory commandFactory)
        {
            this.optionsController        = optionsController;
            this.fileSystem               = fileSystem;
            this.taskManager              = taskManager;
            this.unhandledExceptionPolicy = unhandledExceptionPolicy;
            this.eventAggregator          = eventAggregator;
            this.commandFactory           = commandFactory;

            optionsController.PropertyChanged += (sender, e) =>
            {
                if (e.PropertyName == "RecentProjects")
                {
                    OnPropertyChanged(new PropertyChangedEventArgs("RecentProjects"));
                }
            };

            CanRunTests = new Observable <bool>();
        }