public void GetPendingExpenses() { // Arrange MonthSummary summary = BuildSummary(); // Act var statements = summary.GetPendingExpenses(); // Assert Assert.Equal(2, statements.Count); Assert.Equal(621.10m, statements.Sum(x => x.Amount.Value)); }
private IReadOnlyList <StatementDto> FormatPendingStatements() => summary .GetPendingExpenses() .Select(x => new StatementDto(x.Id, x.DueDate, x.Description, x.Amount, x.Category.Name)) .ToList();