Exemplo n.º 1
0
        public void DeleteBookTest()
        {
            var bookingrepo = new book_management(bookcontextmock.Object);
            var bookdelete  = bookingrepo.DeleteExistingBook(2);

            Assert.AreEqual(true, bookdelete);
        }
Exemplo n.º 2
0
        public void GetBookWithIdTest()
        {
            var bookingrepo = new book_management(bookcontextmock.Object);
            var bookinglist = bookingrepo.GetBookWithId(1);

            Assert.IsNotNull(bookinglist);
        }
Exemplo n.º 3
0
        public void UpdateBookDetailsTest()
        {
            var bookingrepo = new book_management(bookcontextmock.Object);
            var bookupdate  = bookingrepo.UpdateBook(1, new Books {
                BookName = "high 5", BookAuthor = "sam anand", BookEdition = 2
            });

            Assert.AreEqual(true, bookupdate);
        }
Exemplo n.º 4
0
        public void AddBookingDetailTest()
        {
            var bookingrepo = new book_management(bookcontextmock.Object);
            var bookingobj  = bookingrepo.AddNewBook(new Books {
                BookName = "third kite runner", BookAuthor = "khaled", BookEdition = 2
            });

            //Assert.IsNotNull(bookingobj);
            Assert.AreEqual(true, bookingobj);
        }