public Book(int _id) { BookId = _id; Title = BookCRUD.getTitle(_id); Author = BookCRUD.getAuthor(_id); Type = BookCRUD.getType(_id); PenaltyCost = BookCRUD.getPenaltyCost(_id); ReturnDate = BookCRUD.getReturnDate(_id); State = BookCRUD.getState(_id); }
public void GetBookInfoTest() { BorrowedBook b = new BorrowedBook(1); Assert.AreEqual(b.BookInfo(), "\r\nTitle: " + BookCRUD.getTitle(1) + "\r\nAuthor: " + BookCRUD.getAuthor(1) + "\r\nType: " + BookCRUD.getType(1) + "\r\nPenalty Cost: " + BookCRUD.getPenaltyCost(1) + "\r\nReturn Date: " + BookCRUD.getReturnDate(1)); }
public string BookInfo() { return("\r\nTitle: " + BookCRUD.getTitle(BBookId) + "\r\nAuthor: " + BookCRUD.getAuthor(BBookId) + "\r\nType: " + BookCRUD.getType(BBookId) + "\r\nPenalty Cost: " + BookCRUD.getPenaltyCost(BBookId) + "\r\nReturn Date: " + BookCRUD.getReturnDate(BBookId)); }