Exemplo n.º 1
0
        public void Test_Validator_Clear()
        {
            Validator Validate = new Validator();

            int Amount = 5;

            //Generate one validation violation
            Validate.That(Amount, "Amount").IsZero();

            //After clear there should be no validation violations anymore.
            Assert.IsTrue(Validate.HasErrors());

            Validate.Clear();

            //After clear there should be no validation violations anymore.
            Assert.IsFalse(Validate.HasErrors());
        }