public void when_payload_type_set_it_should_be_set_in_configuration() { var configuration = new EgressApiConfiguration(); var sut = new EgressApiConfigurator(configuration); sut.WithMessagePayload <string>().Should().BeSameAs(sut); configuration.MessagePayloadType.Should().Be <string>(); }
public void when_payload_type_set_more_than_once_it_should_fail() { var configuration = new EgressApiConfiguration(); var configurator = new EgressApiConfigurator(configuration); Action sut = () => configurator.WithMessagePayload <string>(); sut.Should().NotThrow(); configuration.MessagePayloadType.Should().Be <string>(); EnsureSecondCallOfConfigurationMethodFails(sut); }