예제 #1
0
        private void rePopulateList(object cacheObject)
        {
            IRunResultCache cache    = (IRunResultCache)cacheObject;
            IItem           selected = null;

            if (listViewFeedback.SelectedItems.Count == 1)
            {
                selected = (IItem)listViewFeedback.SelectedItems[0].Tag;
            }

            listViewFeedback.Items.Clear();
            foreach (var error in cache.Errors)
            {
                addFeedbackItem("Build error", formatBuildResult(error), Color.Red, error, selected);
            }

            foreach (var failed in cache.Failed)
            {
                addFeedbackItem("Test failed", formatTestResult(failed), Color.Red, failed, selected);
            }

            foreach (var warning in cache.Warnings)
            {
                addFeedbackItem("Build warning", formatBuildResult(warning), Color.Black, warning, selected);
            }

            foreach (var ignored in cache.Ignored)
            {
                addFeedbackItem("Test ignored", formatTestResult(ignored), Color.Black, ignored, selected);
            }
            this.Refresh();
        }
 public AutoTestRunnerFeedback(IRunResultCache cache, IMessageBus bus, RunOptions options)
 {
     _runCache = cache;
     _bus      = bus;
     _options  = options;
     setTotalTestCount();
 }
        public void SetUp()
        {
            _project = new Project(Path.GetFullPath("someProject.csproj"), new ProjectDocument(ProjectType.CSharp));
			_project.Value.SetOutputPath("");
			_project.Value.SetAssemblyName("someAssembly.dll");
            _bus = MockRepository.GenerateMock<IMessageBus>();
            _listGenerator = MockRepository.GenerateMock<IGenerateBuildList>();
            _configuration = MockRepository.GenerateMock<IConfiguration>();
            _buildRunner = MockRepository.GenerateMock<IBuildRunner>();
            _testRunner = MockRepository.GenerateMock<ITestRunner>();
			_testAssemblyValidator = MockRepository.GenerateMock<IDetermineIfAssemblyShouldBeTested>();
			_optimizer = MockRepository.GenerateMock<IOptimizeBuildConfiguration>();
            _fs = MockRepository.GenerateMock<IFileSystemService>();
            _cache = MockRepository.GenerateMock<ICache>();
            _runCache = MockRepository.GenerateMock<IRunResultCache>();
			_runInfo = new RunInfo(_project);
			_runInfo.ShouldBuild();
			_runInfo.SetAssembly(_project.Value.AssemblyName);
			_optimizer.Stub(o => o.AssembleBuildConfiguration(new string[] {})).IgnoreArguments().Return(new RunInfo[] { _runInfo });
            _preProcessor = MockRepository.GenerateMock<IPreProcessTestruns>();
            _preProcessor.Stub(x => x.PreProcess(null)).IgnoreArguments().Return(new PreProcessedTesRuns(null, new RunInfo[] { _runInfo }));
            var preProcessors = new IPreProcessTestruns[] { _preProcessor };
            var buildPreProcessor = MockRepository.GenerateMock<IPreProcessBuildruns>();
            buildPreProcessor.Stub(x => x.PreProcess(null)).IgnoreArguments().Return(new RunInfo[] { _runInfo });
            var buildPreProcessors = new IPreProcessBuildruns[] { buildPreProcessor };
            _removedTestLocator = MockRepository.GenerateMock<ILocateRemovedTests>();
            _buildSessionRunner = new BuildSessionRunner(new BuildConfiguration(null), _cache, _bus, _configuration, _buildRunner, buildPreProcessors, _fs, _runCache);
            _consumer = new ProjectChangeConsumer(_bus, _listGenerator, _configuration, _buildSessionRunner, new ITestRunner[] { _testRunner }, _testAssemblyValidator, _optimizer, preProcessors, _removedTestLocator);
        }
예제 #4
0
 public PhpRunHandler(IMessageBus bus, IConfiguration config, ILocateRemovedTests removedTestLocator, IRunResultCache cache)
 {
 	_bus = bus;
     _config = config;
     _removedTestLocator = removedTestLocator;
     _cache = cache;
 }
예제 #5
0
 public PhpRunHandler(IMessageBus bus, IConfiguration config, ILocateRemovedTests removedTestLocator, IRunResultCache cache)
 {
     _bus                = bus;
     _config             = config;
     _removedTestLocator = removedTestLocator;
     _cache              = cache;
 }
예제 #6
0
        public void SetUp()
        {
            _project = new Project(Path.GetFullPath("someProject.csproj"), new ProjectDocument(ProjectType.CSharp));
            _project.Value.SetOutputPath("");
            _project.Value.SetAssemblyName("someAssembly.dll");
            _bus                   = MockRepository.GenerateMock <IMessageBus>();
            _listGenerator         = MockRepository.GenerateMock <IGenerateBuildList>();
            _configuration         = MockRepository.GenerateMock <IConfiguration>();
            _buildRunner           = MockRepository.GenerateMock <IBuildRunner>();
            _testRunner            = MockRepository.GenerateMock <ITestRunner>();
            _testAssemblyValidator = MockRepository.GenerateMock <IDetermineIfAssemblyShouldBeTested>();
            _optimizer             = MockRepository.GenerateMock <IOptimizeBuildConfiguration>();
            _fs       = MockRepository.GenerateMock <IFileSystemService>();
            _cache    = MockRepository.GenerateMock <ICache>();
            _runCache = MockRepository.GenerateMock <IRunResultCache>();
            _runInfo  = new RunInfo(_project);
            _runInfo.ShouldBuild();
            _runInfo.SetAssembly(_project.Value.AssemblyName);
            _optimizer.Stub(o => o.AssembleBuildConfiguration(new string[] {})).IgnoreArguments().Return(new RunInfo[] { _runInfo });
            _preProcessor = MockRepository.GenerateMock <IPreProcessTestruns>();
            _preProcessor.Stub(x => x.PreProcess(null)).IgnoreArguments().Return(new PreProcessedTesRuns(null, new RunInfo[] { _runInfo }));
            var preProcessors     = new IPreProcessTestruns[] { _preProcessor };
            var buildPreProcessor = MockRepository.GenerateMock <IPreProcessBuildruns>();

            buildPreProcessor.Stub(x => x.PreProcess(null)).IgnoreArguments().Return(new RunInfo[] { _runInfo });
            var buildPreProcessors = new IPreProcessBuildruns[] { buildPreProcessor };

            _removedTestLocator = MockRepository.GenerateMock <ILocateRemovedTests>();
            _buildSessionRunner = new BuildSessionRunner(new BuildConfiguration(null), _cache, _bus, _configuration, _buildRunner, buildPreProcessors, _fs, _runCache);
            _consumer           = new ProjectChangeConsumer(_bus, _listGenerator, _configuration, _buildSessionRunner, new ITestRunner[] { _testRunner }, _testAssemblyValidator, _optimizer, preProcessors, _removedTestLocator);
        }
 public BuildSessionRunner(BuildConfiguration buildConfig, ICache cache, IMessageBus bus, IConfiguration config, IBuildRunner buildRunner, IPreProcessBuildruns[] buildPreProcessors, IFileSystemService fs, IRunResultCache runCache)
 {
     _cache = cache;
     _runCache = runCache;
     _buildConfig = buildConfig;
     _fs = fs;
     _bus = bus;
     _configuration = config;
     _buildRunner = buildRunner;
     _preBuildProcessors = buildPreProcessors;
 }
 public BuildSessionRunner(BuildConfiguration buildConfig, ICache cache, IMessageBus bus, IConfiguration config, IBuildRunner buildRunner, IPreProcessBuildruns[] buildPreProcessors, IFileSystemService fs, IRunResultCache runCache)
 {
     _cache              = cache;
     _runCache           = runCache;
     _buildConfig        = buildConfig;
     _fs                 = fs;
     _bus                = bus;
     _configuration      = config;
     _buildRunner        = buildRunner;
     _preBuildProcessors = buildPreProcessors;
 }
 public MinimizingPreProcessor(ICache cache, IRunResultCache resultCache, IConfiguration configuration, IOptimizeBuildConfiguration buildOptimizer, IMessageBus bus, ITestRunner[] runners)
 {
     _cache                      = cache;
     _resultCache                = resultCache;
     _configuration              = configuration;
     _buildOptimizer             = buildOptimizer;
     _bus                        = bus;
     _runner                     = (AutoTestTestRunner)runners.First(x => x.GetType().Name.Equals("AutoTestTestRunner"));
     _minimizer                  = new TestMinimizer(configuration.AllSettings("mm-MinimizerDebug") == "true", 1);
     _profilerData               = new ProfilerData(GetDBName(), new BinaryFileProfilerDataParser(), new ForEveryFixtureConstructorOrFixtureChangeContextChangeFinder());
     _profilerData.DebugMessage += _profilerData_DebugMessage;
     Logger.WriteDebug("Minimizing PreProc Created");
 }
예제 #10
0
        public FeedbackForm(IDirectoryWatcher watcher, IConfiguration configuration, IRunFeedbackPresenter runPresenter, IInformationForm informationForm, IRunResultCache runResultCache, IMessageBus bus)
        {
            _syncContext = AsyncOperationManager.SynchronizationContext;
            _toolTipProvider.AutoPopDelay = 30000;
            _watcher = watcher;
            _runResultCache = runResultCache;
			_bus = bus;
            _runPresenter = runPresenter;
            _runPresenter.View = this;
            _informationForm = informationForm;
            _informationForm.MessageArrived += new EventHandler<MessageRecievedEventArgs>(_informationForm_MessageArrived);
            InitializeComponent();
            configuration.ValidateSettings();
            readFormSpacing();
			FeedbackForm_Resize(this, new EventArgs());
        }
예제 #11
0
 public FeedbackForm(IDirectoryWatcher watcher, IConfiguration configuration, IRunFeedbackPresenter runPresenter, IInformationForm informationForm, IRunResultCache runResultCache, IMessageBus bus, ISendNotifications notifier)
 {
     _syncContext = AsyncOperationManager.SynchronizationContext;
     _toolTipProvider.AutoPopDelay = 30000;
     _watcher           = watcher;
     _configuration     = configuration;
     _runResultCache    = runResultCache;
     _bus               = bus;
     _notifier          = notifier;
     _runPresenter      = runPresenter;
     _runPresenter.View = this;
     _informationForm   = informationForm;
     _informationForm.MessageArrived += new EventHandler <MessageRecievedEventArgs>(_informationForm_MessageArrived);
     InitializeComponent();
     readFormSpacing();
     FeedbackForm_Resize(this, new EventArgs());
 }
예제 #12
0
 public FeedbackView(Action<RunMessages> onMessage, Action<IRunResultCache> onCacheUpdate, DTE2 application)
 {
     _onMessage = onMessage;
     _onCacheUpdate = onCacheUpdate;
     _application = application;
     _presenter = BootStrapper.Services.Locate<IRunFeedbackPresenter>();
     _presenter.View = this;
     _resultsCache = BootStrapper.Services.Locate<IRunResultCache>();
     var infoPresenter = BootStrapper.Services.Locate<IInformationFeedbackPresenter>();
     _infoWindow = new InformationWindow(infoPresenter);
     _itemInfoWindow = new FeedbackItemWindow();
     _itemInfoWindow.LinkClicked += new EventHandler<StringArgs>(_itemInfoWindow_LinkClicked);
     BootStrapper.Services.Locate<IConfiguration>().ValidateSettings();
     _watcher = BootStrapper.Services.Locate<IDirectoryWatcher>();
     if (Connect.WatchFolder != null)
         _watcher.Watch(Connect.WatchFolder);
 }
예제 #13
0
        public FeedbackView(Action <RunMessages> onMessage, Action <IRunResultCache> onCacheUpdate, DTE2 application)
        {
            _onMessage      = onMessage;
            _onCacheUpdate  = onCacheUpdate;
            _application    = application;
            _presenter      = BootStrapper.Services.Locate <IRunFeedbackPresenter>();
            _presenter.View = this;
            _resultsCache   = BootStrapper.Services.Locate <IRunResultCache>();
            var infoPresenter = BootStrapper.Services.Locate <IInformationFeedbackPresenter>();

            _infoWindow                  = new InformationWindow(infoPresenter);
            _itemInfoWindow              = new FeedbackItemWindow();
            _itemInfoWindow.LinkClicked += new EventHandler <StringArgs>(_itemInfoWindow_LinkClicked);
            BootStrapper.Services.Locate <IConfiguration>().ValidateSettings();
            _watcher = BootStrapper.Services.Locate <IDirectoryWatcher>();
            if (Connect.WatchFolder != null)
            {
                _watcher.Watch(Connect.WatchFolder);
            }
        }
 public MinimizingPreProcessor(ICache cache, IRunResultCache resultCache, IConfiguration configuration, IOptimizeBuildConfiguration buildOptimizer, IMessageBus bus, ITestRunner[] runners)
 {
     _cache = cache;
     _resultCache = resultCache;
     _configuration = configuration;
     _buildOptimizer = buildOptimizer;
     _bus = bus;
     _runner = (AutoTestTestRunner)runners.First(x => x.GetType().Name.Equals("AutoTestTestRunner"));
     _minimizer = new TestMinimizer(configuration.AllSettings("mm-MinimizerDebug") == "true", 1);
     _profilerData = new ProfilerData(GetDBName(), new BinaryFileProfilerDataParser(), new ForEveryFixtureConstructorOrFixtureChangeContextChangeFinder());
     _profilerData.DebugMessage += _profilerData_DebugMessage;
     Logger.WriteDebug("Minimizing PreProc Created");
 }
 public AutoTestTestRunner(IConfiguration configuration, IMessageBus bus, IRunResultCache runCache)
 {
     _configuration = configuration;
     _bus           = bus;
     _runCache      = runCache;
 }
예제 #16
0
 public PhpUnitRunner(IRunResultCache cache) {
     _cache = cache;
 }
예제 #17
0
 public RunFailedTestsFirstPreProcessor(IRunResultCache resultCache)
 {
     _resultCache = resultCache;
 }
예제 #18
0
 public void Setup()
 {
     _cache    = MockRepository.GenerateMock <IRunResultCache>();
     _bus      = MockRepository.GenerateMock <IMessageBus>();
     _feedback = new AutoTestRunnerFeedback(_cache, _bus, new AutoTest.TestRunners.Shared.Options.RunOptions());
 }
예제 #19
0
 public void SetUp()
 {
     _resultCache  = MockRepository.GenerateMock <IRunResultCache>();
     _preProcessor = new RunFailedTestsFirstPreProcessor(_resultCache);
 }
		public void SetUp()
		{
			_resultCache = MockRepository.GenerateMock<IRunResultCache>();
			_preProcessor = new RunFailedTestsFirstPreProcessor(_resultCache);
		}
 public void Setup()
 {
     _cache = MockRepository.GenerateMock<IRunResultCache>();
     _bus = MockRepository.GenerateMock<IMessageBus>();
     _feedback = new AutoTestRunnerFeedback(_cache, _bus, new AutoTest.TestRunners.Shared.Options.RunOptions());
 }
예제 #22
0
 public AutoTestTestRunner(IConfiguration configuration, IMessageBus bus, IRunResultCache runCache)
 {
     _configuration = configuration;
     _bus = bus;
     _runCache = runCache;
 }
예제 #23
0
 public PhpUnitRunner(IRunResultCache cache)
 {
     _cache = cache;
 }
		public RunFailedTestsFirstPreProcessor(IRunResultCache resultCache)
		{
			_resultCache = resultCache;
		}
예제 #25
0
 private void relistCache(IRunResultCache cache)
 {
     _syncContext.Post(c => rePopulateList(c), cache);
 }
 public PhpFileChangeConsumer(IMessageBus bus, IConfiguration config, ILocateRemovedTests removedTestLocator, IRunResultCache cache)
 {
     _config  = config;
     _handler = new PhpRunHandler(bus, config, removedTestLocator, cache);
 }
예제 #27
0
 private void relistCache(IRunResultCache cache)
 {
     _syncContext.Post(c => rePopulateList(c), cache);
 }
예제 #28
0
 public RemovedTestsLocator(IRunResultCache cache)
 {
     _cache = cache;
 }
 public RemovedTestsLocator(IRunResultCache cache)
 {
     _cache = cache;
 }
예제 #30
0
 public AutoTestRunnerFeedback(IRunResultCache cache, IMessageBus bus, RunOptions options)
 {
     _runCache = cache;
     _bus = bus;
     _options = options;
     setTotalTestCount();
 }