Пример #1
0
 public void Should_not_publish_event_when_validator_invalidates_change()
 {
     _validator.Stub(v => v.ShouldPublish("")).IgnoreArguments().Return(false);
     File.Create(_file).Dispose();
     Thread.Sleep(100);
     _messageBus.AssertWasNotCalled(m => m.Publish <FileChangeMessage>(null), m => m.IgnoreArguments());
 }
Пример #2
0
        public void Should_not_publish_if_no_project_was_found()
        {
            var locator = new FakeProjectLocator(new ChangedFile[] { });

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

            message.AddFile(new ChangedFile("somefile.cs"));
            _subject.Consume(message);
            _bus.AssertWasNotCalled(b => b.Publish <ProjectChangeMessage>(null), b => b.IgnoreArguments());
        }
Пример #3
0
 public void Should_not_consume_regular_file()
 {
     _files.AddFile(new ChangedFile("someTextFile.txt"));
     _consumer.Consume(_files);
     _bus.AssertWasNotCalled(b => b.Publish <AssemblyChangeMessage>(null), b => b.IgnoreArguments());
 }