Exemple #1
0
        public void IsNotValidWhenHoldingDoesNotExist()
        {
            validator = new PatronRetrievalValidator(context, 1);
            context.Patrons.Add(new Patron(2, ""));
            context.SaveChanges();

            validator.Validate();

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

            validator.Validate();

            Assert.True(validator.IsValid);
        }