public void Test_NotValidWhenPortIsNotExist()
        {
            // Arrange
            var host = HostValidatorHelper.GetValidRequestDto();

            host.Port = -10;

            // Assert
            Assert.IsFalse(_validator.Validate(host).IsValid);
        }
        public void Test_NotValidWhenDelayIsNegative()
        {
            // Arrange
            var host = HostValidatorHelper.GetValidRequestDto();

            host.DelayInMilliseconds = -10;

            // Assert
            Assert.IsFalse(_validator.Validate(host).IsValid);
        }
Beispiel #3
0
        public void Test_NotValidWhenHostIEmpty()
        {
            // Arrange
            var host = HostValidatorHelper.GetValidRequestDto();

            host.Host = "";

            // Assert
            Assert.IsFalse(_validator.Validate(host).IsValid);
        }
Beispiel #4
0
        public void Test_NotValidWhenHostIsNotCorrect()
        {
            // Arrange
            var host = HostValidatorHelper.GetValidRequestDto();

            host.Host = "yandexru";

            // Assert
            Assert.IsFalse(_validator.Validate(host).IsValid);
        }
Beispiel #5
0
        public void Test_NotValidWhenHostLengthIsLessThanFive()
        {
            // Arrange
            var host = HostValidatorHelper.GetValidRequestDto();

            host.Host = "o.ru";

            // Assert
            Assert.IsFalse(_validator.Validate(host).IsValid);
        }