Beispiel #1
0
        public void TestPhoneNumberRegexDe_False()
        {
            // arrange
            var phoneNumberValidationRule = new PhoneNumberValidationRule();
            // act
            var result = phoneNumberValidationRule.Validate("+49123456789", CultureInfo.CurrentCulture);

            // assert
            Assert.IsFalse(result.IsValid);
        }
Beispiel #2
0
        //[TestCase("+49 1234--5678-02")]
        //[TestCase("+49  1234-5678-02")]
        public void Validate_WithInvalidValue(string value)
        {
            // Arrange
            var sut = new PhoneNumberValidationRule(_ERROR_MESSAGE);

            // Act
            var result = sut.Validate(value);

            // Assert
            result.Should().BeFalse();
        }