public void ValidateBook_NullStatus() { BookValidation bookvalid = new BookValidation(); Book book = new Book(); book.SetBookID(-1); book.SetName("Times"); book.SetAuthor("David Bolton"); book.SetStatus(""); book.SetPrice(25); book.SetRackno(0); book.SetCount(2); bool result = bookvalid.ValidateBook(book); Assert.AreEqual(false, result); }
public void ValidateBook_Valid() { BookValidation bookvalid = new BookValidation(); Book book = new Book(); book.SetBookID(1); book.SetName("Times"); book.SetAuthor("David Bolton"); book.SetStatus("Available"); book.SetPrice(25); book.SetRackno(12); book.SetCount(2); bool result = bookvalid.ValidateBook(book); Assert.AreEqual(true, result); }