public void GetIndexExpensesCorrectDate()
        {
            // arrange
            var start = Util.MyDate.GetStartDateTime(DateTime.Today);
            var end   = Util.MyDate.GetEndDateTime(DateTime.Today);

            // act
            var indexExpenses = _appService.GetIndexExpenses(start, end);

            // assert
            Assert.IsTrue(indexExpenses.Incoming.Any());
            Assert.IsTrue(indexExpenses.Outcoming.Any());
            Assert.AreNotEqual(0, indexExpenses.TotalIncoming);
            Assert.AreNotEqual(0, indexExpenses.TotalOutcoming);
            Assert.AreNotEqual(0, indexExpenses.TotalLeft);
        }
Beispiel #2
0
        // GET: Expenses
        public IActionResult Index(int month, int year)
        {
            DateTime startDateTime = Util.MyDate.GetStartDateTime(month, year);
            DateTime endDateTime   = Util.MyDate.GetEndDateTime(month, year);

            CreateDateLists(startDateTime.Month, startDateTime.Year);

            return(View(_service.GetIndexExpenses(startDateTime, endDateTime)));
        }