public void TestGetBooksByIDMethod() { BooksSqlDAL booksSqlDal = new BooksSqlDAL(); BookModel bookByID = booksSqlDal.GetBooksById(bookId); Assert.IsNotNull(bookByID); Assert.AreEqual("The Test Title", bookByID.Title.ToString()); }
public void TestGetNewAuthorList() { BooksSqlDAL booksSqldal = new BooksSqlDAL(); List <String> authorList = booksSqldal.GetNewAuthorList(); Assert.IsNotNull(authorList); Assert.AreEqual(1, authorList.Count); }
public void TestGetBooksMethod_TestByCharacter() { BooksSqlDAL booksSqlDal = new BooksSqlDAL(); List <BookModel> books = booksSqlDal.GetBooks("Test", "Character"); Assert.IsNotNull(books); Assert.AreEqual(1, books.Count); }
public void TestGetNewBookList() { BooksSqlDAL booksSqlDal = new BooksSqlDAL(); List <BookModel> booksList = booksSqlDal.GetNewBookList(); Assert.IsNotNull(booksList); Assert.AreEqual(1, booksList.Count); }
public void TestAddNewBook() { BooksSqlDAL dal = new BooksSqlDAL(); BookModel model = new BookModel(); model.Author = "Stuk, Gina"; model.Title = ""; model.MainCharacter = "Detective Brandon"; model.Setting = "Cleveland, OH"; model.Genre = "Mystery"; model.Description = "Lorem"; model.ImageLink = "https://images-na.ssl-images"; bool isAdded = dal.AddNewBook(model); Assert.IsTrue(isAdded); }