Inheritance: IPersonValidator
Exemplo n.º 1
0
        public void CanPurchase_PersonWitNoCreditPassesValidation_ReturnFalse()
        {
            MyLittleFakeValidator validator = new MyLittleFakeValidator();

            validator.WillReturnIsValid = true;

            PersonLogicBTestable pl = new PersonLogicBTestable(validator);

            bool canPurchase = pl.CanPurchase(new Person());

            Assert.IsFalse(canPurchase);
        }
Exemplo n.º 2
0
        public void CanPurchase_PersonWitNoCreditPassesValidation_ReturnFalse()
        {
            MyLittleFakeValidator validator = new MyLittleFakeValidator();
            validator.WillReturnIsValid = true;

            PersonLogicBTestable pl = new PersonLogicBTestable(validator);

            bool canPurchase = pl.CanPurchase(new Person());
            Assert.IsFalse(canPurchase);
        }