Beispiel #1
0
        public void T9_GetPatrons_ReturnsAllCopyPatrons()
        {
            Patron testPatron1 = new Patron("Sarah");

            testPatron1.Save();
            Patron testPatron2 = new Patron("John");

            testPatron2.Save();


            Copy testCopy = new Copy(5);

            testCopy.Save();

            testCopy.AddPatron(testPatron1);
            List <Patron> result   = testCopy.GetPatron();
            List <Patron> testList = new List <Patron> {
                testPatron1
            };

            Assert.Equal(testList, result);
        }
Beispiel #2
0
        public void T8_Addpatron_AddspatronToCopy()
        {
            Book newBook = new Book("Freedom");

            newBook.Save();

            Patron testPatron = new Patron("Sarah");

            testPatron.Save();


            Copy testCopy = new Copy(1);

            testCopy.Save();

            testCopy.AddPatron(testPatron);
            List <Patron> result   = testCopy.GetPatron();
            List <Patron> testList = new List <Patron> {
                testPatron
            };

            Assert.Equal(testList, result);
        }
Beispiel #3
0
        public void T9_GetPatrons_ReturnsAllCopyPatrons()
        {
            Patron testPatron1 = new Patron("Sarah");
              testPatron1.Save();
              Patron testPatron2 = new Patron("John");
              testPatron2.Save();

              Copy testCopy = new Copy(5);
              testCopy.Save();

              testCopy.AddPatron(testPatron1);
              List<Patron> result = testCopy.GetPatron();
              List<Patron> testList= new List<Patron>{testPatron1};

              Assert.Equal(testList,result);
        }
Beispiel #4
0
        public void T8_Addpatron_AddspatronToCopy()
        {
            Book newBook = new Book("Freedom");
              newBook.Save();

              Patron testPatron = new Patron("Sarah");
              testPatron.Save();

              Copy testCopy = new Copy(1);
              testCopy.Save();

              testCopy.AddPatron(testPatron);
              List<Patron> result = testCopy.GetPatron();
              List<Patron> testList = new List<Patron> {testPatron};

              Assert.Equal(testList, result);
        }