public void when_string_is_shorter_than_min_validation_fails() { //given var sut = new StringWithMinLength { String = GenerateString.WithLength(MinLength - 1) }; //then Validate(sut).Should().Throw <ValidationException>(); }
public void when_string_is_longer_than_min_validation_passes() { //given var sut = new StringWithMinLength { String = GenerateString.WithLength(MinLength + 1) }; //then Validate(sut).Should().NotThrow <ValidationException>(); }