예제 #1
0
        public void TestAddValidationRule()
        {
            //arrange
            var rule = new IsNotNullOrEmptyRule <string>("Value cannot be null");

            _validatableObject.Value = "Hello World";
            _validatableObject.AddValidationRule(rule);

            //act
            int actual = _validatableObject.Validations.Count;

            //assert
            Assert.AreEqual(1, actual);
        }