public void when_some_required_property_not_set_it_should_be_not_validated() { ConfigurationTests.CreateEgressApiConfiguration().With(configuration => configuration.Id = null) .Validate().Should().HaveCount(expected: 1); ConfigurationTests.CreateEgressApiConfiguration().With(configuration => configuration.PipeFitterType = null) .Validate().Should().HaveCount(expected: 1); ConfigurationTests.CreateEgressApiConfiguration().With(configuration => configuration.MessageTypesRegistryType = null) .Validate().Should().HaveCount(expected: 1); ConfigurationTests.CreateIngressApiConfiguration().With(configuration => configuration.MessageKeyType = null) .Validate().Should().HaveCount(expected: 1); ConfigurationTests.CreateIngressApiConfiguration().With(configuration => configuration.MessagePayloadType = null) .Validate().Should().HaveCount(expected: 1); }
public void when_all_required_properties_set_it_should_be_valid() { var sut = ConfigurationTests.CreateEgressApiConfiguration(); sut.Validate().Should().NotBeNull().And.Subject.Should().BeEmpty("there is no errors in the configuration"); }