示例#1
0
        public void Validate_InvalidIp_ReturnFalse(string ipAddress)
        {
            IpAddressValidator validator = new IpAddressValidator();
            var isValidIp = validator.Validate(ipAddress);

            Assert.IsFalse(isValidIp);
        }
            public void ShouldBeInvalidIfInvalidIpAddress(string value)
            {
                // Arrange
                var validator = new IpAddressValidator();

                // Act
                validator.Validate(value);

                // Assert
                validator.IsInvalid.ShouldBe(true);
            }
            public void ShouldBeDirtyOnceValidated()
            {
                // Arrange
                string value     = "Test";
                var    validator = new IpAddressValidator();

                // Act
                validator.Validate(value);

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