Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Created January 24, 2016 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angelovstanton/4f23fca6dfee498262c9 to your computer and use it in GitHub Desktop.
Save angelovstanton/4f23fca6dfee498262c9 to your computer and use it in GitHub Desktop.
public class PromotionalPurchaseSpecification : Specification<PurchaseTestInput>
{
private readonly PurchaseTestInput purchaseTestInput;
public PromotionalPurchaseSpecification(PurchaseTestInput purchaseTestInput)
{
this.purchaseTestInput = purchaseTestInput;
}
public override bool IsSatisfiedBy(PurchaseTestInput entity)
{
return this.purchaseTestInput.IsPromotionalPurchase && this.purchaseTestInput.TotalPrice < 5;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment