Exemple #1
0
        public void CheckIn_OneCopy_CopyAvailable()
        {
            Patron testPatron = new Patron("Britton");

            testPatron.Save();

            Copy newCopy = new Copy(1, 15);

            newCopy.Save();

            testPatron.AddCopy(newCopy);
            testPatron.CheckIn(newCopy);

            int available = newCopy.GetAvailable();

            Assert.Equal(1, available);
        }
Exemple #2
0
        public void CheckIn_OneCopy_PatronAndNewCopy()
        {
            Patron testPatron = new Patron("Britton");

            testPatron.Save();

            Copy newCopy = new Copy(1, 15);

            newCopy.Save();

            testPatron.AddCopy(newCopy);
            testPatron.CheckIn(newCopy);

            List <Copy> allCopies  = testPatron.GetCurrentCopy();
            int         checkedOut = allCopies.Count;

            Assert.Equal(0, checkedOut);
        }