@Test public void shouldRenderTodaysTotalExpenses() throws Exception { presenter.renderTotalExpense(); verify(view).displayTotalExpense(190l); }
public void renderTotalExpense() { Long totalExpense = 0l; for (Expense expense : expenses) totalExpense += expense.getAmount(); view.displayTotalExpense(totalExpense); }
TodaysExpensePresenter { public void renderTotalExpense() { Long totalExpense = 0l; for (Expense expense : expenses) totalExpense += expense.getAmount(); view.displayTotalExpense(totalExpense); } }
TodaysExpensePresenter { public void renderTotalExpense() { Long totalExpense = 0l; for (Expense expense : expenses) totalExpense += expense.getAmount(); view.displayTotalExpense(totalExpense); } TodaysExpensePresenter(TodaysExpenseView view, ExpenseDatabaseHelper expenseDatabaseHelper); }
TodaysExpensePresenter { public void renderTotalExpense() { Long totalExpense = 0l; for (Expense expense : expenses) totalExpense += expense.getAmount(); view.displayTotalExpense(totalExpense); } TodaysExpensePresenter(TodaysExpenseView view, ExpenseDatabaseHelper expenseDatabaseHelper); void renderTotalExpense(); void renderTodaysExpenses(); }
TodaysExpensePresenter { public void renderTotalExpense() { Long totalExpense = 0l; for (Expense expense : expenses) totalExpense += expense.getAmount(); view.displayTotalExpense(totalExpense); } TodaysExpensePresenter(TodaysExpenseView view, ExpenseDatabaseHelper expenseDatabaseHelper); void renderTotalExpense(); void renderTodaysExpenses();  }