コード例 #1
0
  @Test
  public void byAuthor() {
    List<Book> books = service.findBooksByAuthor("Mann");
    assertEquals(1, books.size());

    Book book = books.get(0);
    assertEquals("Buddenbrooks", book.getTitle());
  }
コード例 #2
0
 @Test
 public void numAuthors() {
   assertEquals(2, service.getNumAuthors());
   service.createAuthor("Theodor", "Storm");
   assertEquals(3, service.getNumAuthors());
 }
コード例 #3
0
 @Before
 public void setUp() {
   service.fillLibrary();
 }