예제 #1
0
        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));
        }
예제 #2
0
 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);
 }
예제 #3
0
        public void CheckContentOfBooksCollection()
        {
            ListsViewModel listsViewModel     = new ListsViewModel();
            ObservableCollection <Book> books = listsViewModel.GetBooks();

            for (int i = 0; i < books.Count; i++)
            {
                Assert.AreEqual(books[i].Title, BookCRUD.getTitle(books[i].BookId));
                Assert.AreEqual(books[i].Author, BookCRUD.getAuthor(books[i].BookId));
            }
        }
예제 #4
0
파일: Book.cs 프로젝트: basia-224085/PT_Lab
 public Book(int _id)
 {
     Title = BookCRUD.getTitle(_id);
 }
예제 #5
0
 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));
 }