Ejemplo n.º 1
0
        public void Should_publish_run_started_message()
        {
            _listGenerator.Stub(l => l.Generate(null)).IgnoreArguments().Return(new string[] { });

            _consumer.Consume(new ProjectChangeMessage());
            _bus.AssertWasCalled(b => b.Publish <RunStartedMessage>(null), b => b.IgnoreArguments());
        }
Ejemplo n.º 2
0
        public void Should_publish_passing_test_that_has_previously_failed()
        {
            _cache.Stub(x => x.Failed).Return(new TestItem[] { new TestItem("", "", new AutoTest.Messages.TestResult(TestRunner.NUnit, TestRunStatus.Failed, "PreviouslyFailingTest")) });

            _feedback.TestFinished(new AutoTest.TestRunners.Shared.Results.TestResult("", "", "", 0, "PreviouslyFailingTest", AutoTest.TestRunners.Shared.Results.TestState.Passed, ""));

            _bus.AssertWasCalled(x => x.Publish <LiveTestStatusMessage>(null), x => x.IgnoreArguments());
        }
Ejemplo n.º 3
0
        public void Should_publish_if_project_was_found()
        {
            var locator = new FakeProjectLocator(new ChangedFile[] { new ChangedFile("someproject.csproj") });

            _services.Stub(s => s.LocateAll <ILocateProjects>()).Return(new ILocateProjects[] { locator });
            var fileChange = new FileChangeMessage();

            fileChange.AddFile(new ChangedFile("asdf.cs"));
            _subject.Consume(fileChange);
            _bus.AssertWasCalled(b => b.Publish <ProjectChangeMessage>(null), b => b.IgnoreArguments());
        }
Ejemplo n.º 4
0
        public void Should_log_information_message_if_add_project_fails()
        {
            _fsService.WhenCrawlingFor("*.csproj").Return("a_project.csproj");
            _cache.ShouldThrowErrorOnAdd();
            _crawler.Crawl("");

            _bus.AssertWasCalled(b => b.Publish <InformationMessage>(new InformationMessage("")), b => b.IgnoreArguments());
        }
Ejemplo n.º 5
0
 public void Should_consume_exe_files()
 {
     _files.AddFile(new ChangedFile("myexefile.exe"));
     _consumer.Consume(_files);
     _bus.AssertWasCalled(b => b.Publish <AssemblyChangeMessage>(null), b => b.IgnoreArguments());
 }