public void UpdateBookError() { BookRow bookRow = new BookRow(); Book book = new Book(); book.author = new Author(); bookContainer.UpdateBook(book); Assert.AreNotEqual(bookRow, bookContainerStub.bookRow); }
public void UpdateBookFailed() { bookContainerStub.Testvalue = false; BookRow bookRow = new BookRow(); Book book = new Book(); book.author = new Author(); bookContainer.UpdateBook(book); Assert.AreNotEqual(bookRow, bookContainerStub.bookRow); }
public void UpdateBookSucces() { bookContainerStub.Testvalue = true; BookRow bookRow = new BookRow(); Book book = new Book(); book.author = new Author(); bookContainer.UpdateBook(book); Assert.ReferenceEquals(bookRow, bookContainerStub.bookRow); }
public object Add(Book book) { var bookRow = new BookRow { Title = book.Title, Price = book.Price }; db.Books.Add(bookRow); db.SaveChanges(); return(bookRow.Id); }
public void DeleteBook(BookDTO book) { if (Testvalue == null) { throw new NullReferenceException("Invalid use of stub code. First set field ExistsReturnValue"); } if (!Testvalue.Value) { bookRow = new BookRow(); } }
Book Retrieve(int id) { Book b = Books.Where(x => x.ID = id).FirstOrDefault(); if (b != null) { return(b); } BookRow r = Table.Find(id); b = new Book(); b.ID = r.Field <int>("ID"); b.Title = r.Field <string>("Title"); b.AvailableForCheckout = r.Field <bool>("AvailableForCheckout"); return(b); }
public BookRow AddBookRow(string BookID, string BookName, string BookWriter, string BookPublish, System.DateTime BookPublishDate, double BookPrice, string BookSort, int BookAmount, int BookRemain) { BookRow rowBookRow = ((BookRow)(this.NewRow())); object[] columnValuesArray = new object[] { BookID, BookName, BookWriter, BookPublish, BookPublishDate, BookPrice, BookSort, BookAmount, BookRemain }; rowBookRow.ItemArray = columnValuesArray; this.Rows.Add(rowBookRow); return(rowBookRow); }
public BookRowChangeEvent(BookRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; }
public void RemoveBookRow(BookRow row) { this.Rows.Remove(row); }
public void AddBookRow(BookRow row) { this.Rows.Add(row); }
public ReferenceItem(BookRow book, ChapterRow chapter, VerseRow verse, WordRow word) : this(book, chapter, verse) { Word = word; }
public ReferenceItem(BookRow book, ChapterRow chapter, VerseRow verse) { Book = book; Chapter = chapter; Verse = verse; }