Пример #1
0
            public void ShouldBeInvalidIfNotWellFormedUrlString(string value)
            {
                // Arrange
                var validator = new WellFormedUrlValidator();

                // Act
                validator.Validate(value);

                // Assert
                validator.IsInvalid.ShouldBe(true);
            }
Пример #2
0
            public void ShouldBeValidIfWellFormedUri(string value)
            {
                // Arrange
                var uri       = new Uri(value);
                var validator = new WellFormedUrlValidator();

                // Act
                validator.Validate(uri);

                // Assert
                validator.IsInvalid.ShouldBe(false);
            }
Пример #3
0
            public void ShouldBeDirtyOnceValidated()
            {
                // Arrange
                string value     = "www.website.com";
                var    validator = new WellFormedUrlValidator();

                // Act
                validator.Validate(value);

                // Assert
                validator.IsDirty.ShouldBe(true);
            }