예제 #1
0
        public void DeleteBookTest()
        {
            var bookingrepo = new book_management(bookcontextmock.Object);
            var bookdelete  = bookingrepo.DeleteExistingBook(2);

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

            Assert.IsNotNull(bookinglist);
        }
예제 #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);
        }
예제 #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);
        }