public void Edit_Passes_Correct_Expense_To_View() { var expenseId = 42; var expectedExpense = new Expense(); expenseRepo.GetById(expenseId).Returns(expectedExpense); var result = underTest.Edit(expenseId); var model = ((ViewResult)result).Model; Assert.Same(expectedExpense, model); }