public void InitAndFill() { // arrange // act var all = _appService.Get(); // assert Assert.IsTrue(all.Any()); }
public IEnumerable <IndexPaymentDto> Get(DateTime starDateTime, DateTime endDateTime) { IEnumerable <ExpenseDto> allExpenses = _expenseAppService.Get().Where(x => x.Data >= starDateTime && x.Data <= endDateTime); return(Get().GroupJoin( allExpenses, payment => payment.Id, expense => expense.PaymentId, (payment, expenses) => new { payment, expenses }) .Select(x => new IndexPaymentDto { Payment = x.payment, Amount = x.expenses.Count(), Value = x.expenses.Sum(y => y.Value) })); }
public IEnumerable <string> Get() { return(_expenseAppService.Get().Select(x => x.Name).ToList()); }