コード例 #1
0
 public void UpdateBookTest()
 {
     IBooksRepository repository = new MemoryBookRepository();
     const string newTitle = "Changed Title";
     Book book = repository.Get(1);
     book.Title = newTitle;
     repository.Update(book);
     Assert.AreEqual(newTitle, repository.Get(1).Title);
 }
コード例 #2
0
 public void GetBookTest()
 {
     IBooksRepository repository = new MemoryBookRepository();
     Book book = repository.Get(2);
     Assert.AreEqual("JAVA 5 e Programação por Objectos",book.Title);
 }