コード例 #1
0
  public void testDeleteInexistentExpense() throws MyException {
    assertEquals(repository.size(), 0);
    try {
      repository.delete(expense);
      throw new MyException("Delete test failed");
    } catch (MyException e) {

    }
  }
コード例 #2
0
 public void testDeleteExpense() throws MyException {
   saveEntities();
   assertEquals(repository.size(), entities.size());
   repository.delete(entities.get(2));
   assertEquals(repository.size(), entities.size() - 1);
 }