public void IsNotValidWhenHoldingDoesNotExist() { validator = new PatronRetrievalValidator(context, 1); context.Patrons.Add(new Patron(2, "")); context.SaveChanges(); validator.Validate(); Assert.False(validator.IsValid); }
public void IsValidWhenHoldingExists() { validator = new PatronRetrievalValidator(context, 1); context.Patrons.Add(new Patron(1, "")); context.SaveChanges(); validator.Validate(); Assert.True(validator.IsValid); }