public void BuildWithoutSubscribers() { var registry = A.Fake <ISubscriptionRegistry>(); var sut = new AmqpSubscriptionBuilder(); ISubscriptionTag publishingTag = sut.Build(registry); A.CallTo(registry) .Where(call => call.Method.Name == "Subscribe") .MustNotHaveHappened(); }
public void BuildWithSubscribers() { var registry = A.Fake <ISubscriptionRegistry>(); var sut = new AmqpSubscriptionBuilder(); sut.RouteTo <string>("test1", "test1"); sut.RouteTo <string>("test2", "test2"); ISubscriptionTag publishingTag = sut.Build(registry); A.CallTo(() => registry.Subscribe <string>(A <ISubscriber> .Ignored, A <int> .Ignored)).MustHaveHappenedTwiceExactly(); }