public void AddSingleLevelWildcard() { // Arrange ITopicBuilder builder = new TopicBuilder(TopicConsumer.Publisher); // Act Action addSingleLevelWildcard = () => builder = builder.AddMultiLevelWildcard(); // Assert addSingleLevelWildcard.Should() .Throw <IllegalStateOperationException>( "because a topic used on PUBLISH mode cannot use wildcard"); }
public void AddMultiLevelWildcard() { // Arrange ITopicBuilder builder = new TopicBuilder(TopicConsumer.Subscriber); // Act builder = builder.AddMultiLevelWildcard(); // Assert builder.Levels .Should() .Be(1, "because the wildcard consist of one level"); builder.IsAppendingAllowed .Should() .BeFalse("because no addition should be allowed after a multi-level wildcard"); }