public void CustomerAccountHasLateFeesSpecification_Should_Not_Be_Satisfied_By_A_Customer_With_Late_Fees_When_Used_With_A_NotSpecification() { CustomerAccount customerWithLateFess = new CustomerAccount() { LateFees = 100 }; ISpecification <CustomerAccount> specification = new CustomerAccountHasLateFeesSpecification(); Assert.IsFalse(specification.Not().IsSatisfiedBy(customerWithLateFess)); }
public void CustomerAccountHasLateFeesSpecification_Should_Not_Be_Satisfied_By_A_Customer_With_Zero_Late_Fees() { CustomerAccount customerWithNoLateFess = new CustomerAccount() { LateFees = 0 }; CustomerAccountHasLateFeesSpecification specification = new CustomerAccountHasLateFeesSpecification(); Assert.IsFalse(specification.IsSatisfiedBy(customerWithNoLateFess)); }
public void A_Composite_Of_Two_Satisfied_Specifications_Should_Not_Be_Satisfied_When_Used_With_A_NotSpecification() { CustomerAccount customerActive = new CustomerAccount() { AccountActive = true, LateFees = 100 }; ISpecification <CustomerAccount> specificationActive = new CustomerAccountStillActiveSpecification(); ISpecification <CustomerAccount> specificationLateFees = new CustomerAccountHasLateFeesSpecification(); Assert.IsFalse(specificationActive.And(specificationLateFees).Not().IsSatisfiedBy(customerActive)); }