public void CreateMonthlyStatementShouldDiplayOrderedData() { List <TransactionLine> statements = TransactionLineBuilder.BuildList() .Add(-240m, day: 22) .Add(1_000m, day: 07) .Add(-800m, day: 10) .Add(-90m, day: 09) .Build(); List <MonthlyView> months = new MonthlyViewBuilder(statements).Build(100m); Assert.Equal(DateTime.Parse("2019-04-07"), months.First().Lines[0].TransactionDate); Assert.Equal(DateTime.Parse("2019-04-09"), months.First().Lines[1].TransactionDate); Assert.Equal(DateTime.Parse("2019-04-10"), months.First().Lines[2].TransactionDate); Assert.Equal(DateTime.Parse("2019-04-22"), months.First().Lines[3].TransactionDate); }
public void CreateMonthlyStatement() { List <TransactionLine> statements = TransactionLineBuilder.BuildList() .Add(1_000m, "salary", day: 07, category: "Entrada") .Add(-800m, "aluguel", day: 10, category: "Educação") .Build(); List <MonthlyView> months = new MonthlyViewBuilder(statements).Build(100m); Assert.Single(months); ValitadeMonth(months.First(), 4, 100m, 300m, 2); }