public void IsValidShouldReturnFalseIfTheSpecifiedValueIsNotIComparable()
        {
            BetweenValidator validator = new BetweenValidator(-5, 5);

            Assert.IsFalse(validator.IsValid(new Dictionary<string, object>()));
            Assert.IsFalse(validator.IsValid(new List()));
        }
        public void IsValidShouldReturnFalseIfTheSpecifiedValueIsNotBetweenBoundaries()
        {
            BetweenValidator validator = new BetweenValidator(-5, 5);

            Assert.IsFalse(validator.IsValid(10));
            Assert.IsFalse(validator.IsValid(-10));
        }
        public void IsValidShouldReturnTrueIfTheSpecifiedValueIsBetweenBoundaries()
        {
            BetweenValidator validator = new BetweenValidator(-5, 5);

            Assert.IsTrue(validator.IsValid(1));
            Assert.IsTrue(validator.IsValid(0));
        }
        public void FromValueAndToValuePropertiesShouldBeSetCorrectly()
        {
            BetweenValidator validator = new BetweenValidator(5, 10);

            Assert.AreEqual(5, validator.FromValue);
            Assert.AreEqual(10, validator.ToValue);
        }
        public void IsValidShouldReturnFalseIfTheSpecifiedValueIsNotSameType()
        {
            BetweenValidator validator = new BetweenValidator(-5, 5);

            Assert.IsFalse(validator.IsValid("0"));
            Assert.IsFalse(validator.IsValid(5M));
            Assert.IsFalse(validator.IsValid(5F));
        }
        public void IsValidShouldReturnTrueIfTheSpecifiedValueIsNull()
        {
            BetweenValidator validator = new BetweenValidator(-5, 5);

            Assert.IsTrue(validator.IsValid(null));
        }