Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Created January 24, 2016 17:33
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/aa68869be374e6e3dbe3 to your computer and use it in GitHub Desktop.
Save angelovstanton/aa68869be374e6e3dbe3 to your computer and use it in GitHub Desktop.
public class CreditCardSpecification : Specification<PurchaseTestInput>
{
private readonly PurchaseTestInput purchaseTestInput;
public CreditCardSpecification(PurchaseTestInput purchaseTestInput)
{
this.purchaseTestInput = purchaseTestInput;
}
public override bool IsSatisfiedBy(PurchaseTestInput entity)
{
return !string.IsNullOrEmpty(this.purchaseTestInput.CreditCardNumber);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment