@Test public void shouldRenderTotalExpenses() throws Exception { Expense food = new Expense(100l, "Food", "01-10-2015"); Expense travel = new Expense(150l, "Travel", "02-10-2015"); when(database.getExpensesForCurrentMonthGroupByCategory()).thenReturn(asList(food, travel)); CurrentMonthExpensePresenter presenter = new CurrentMonthExpensePresenter(view, database); presenter.showTotalExpense(); verify(view).displayTotalExpense(250l); }
public void showTotalExpense() { view.displayTotalExpense(expenseCollection.getTotalExpense()); }
CurrentMonthExpensePresenter { public void showTotalExpense() { view.displayTotalExpense(expenseCollection.getTotalExpense()); } }
CurrentMonthExpensePresenter { public void showTotalExpense() { view.displayTotalExpense(expenseCollection.getTotalExpense()); } CurrentMonthExpensePresenter(CurrentMonthExpenseView view, ExpenseDatabaseHelper database); }
CurrentMonthExpensePresenter { public void showTotalExpense() { view.displayTotalExpense(expenseCollection.getTotalExpense()); } CurrentMonthExpensePresenter(CurrentMonthExpenseView view, ExpenseDatabaseHelper database); void plotGraph(); void showTotalExpense(); }
CurrentMonthExpensePresenter { public void showTotalExpense() { view.displayTotalExpense(expenseCollection.getTotalExpense()); } CurrentMonthExpensePresenter(CurrentMonthExpenseView view, ExpenseDatabaseHelper database); void plotGraph(); void showTotalExpense();  }