public async Task ExpensesController_GetTeamExpensesByMemberCount_Test() { bool called = false; var expenseRepository = new Data.Repositories.Fakes.StubIExpenseRepository(); var notificationChannelRepository = new Data.Repositories.Fakes.StubINotificationChannelRepository(); var notificationService = new Services.Fakes.StubINotificationService(); expenseRepository.GetTeamExpensesByMemberCountAsyncString = (id) => { called = true; return(Task.FromResult(10)); }; var target = new ExpensesController(expenseRepository, new SecurityHelper(), notificationChannelRepository, notificationService); var result = await target.GetTeamExpensesByMemberCount(); Assert.IsTrue(result == 10); Assert.IsTrue(called); }