public void CanBuildWithoutPublishers() { var registry = A.Fake <IPublisherRegistry>(); var sut = new AmqpPublishingBuilder(); IPublishingTag publishingTag = sut.Build(registry); A.CallTo(() => registry.RegisterPublisher <int>(A <IPublisher> .Ignored)).MustNotHaveHappened(); }
public void CanBuildWithPublishers() { var registry = A.Fake <IPublisherRegistry>(); var sut = new AmqpPublishingBuilder(); sut.ReactOn <string>("test1"); sut.ReactOn <string>("test2"); IPublishingTag publishingTag = sut.Build(registry); A.CallTo(() => registry.RegisterPublisher <string>(A <IPublisher> .Ignored)).MustHaveHappenedTwiceExactly(); }