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()); }
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()); }
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()); }