Пример #1
0
        public void TestDaysPre()
        {
            _dateProvider.SetToday(new DateTime(2019, 01, 31));

            Assert.That(_budgetService.GetNumberOfPastDays(_budget), Is.EqualTo(0));
            Assert.That(_budgetService.GetNumberOfRemainingDays(_budget), Is.EqualTo(3));
            Assert.That(_budgetService.GetNumberOfTotalDays(_budget), Is.EqualTo(3));
            Assert.That(_budgetService.IsTodayInBudgetScope(_budget), Is.EqualTo(false));
        }
Пример #2
0
        public void TestPre()
        {
            _dateProvider.SetToday(new DateTime(2019, 01, 31));

            Assert.That(_budgetService.CalculateSavings(_budget), Is.EqualTo(0));
            Assert.That(_budgetService.CalculateTodaysAllowance(_budget), Is.EqualTo(0));
            Assert.That(_budgetService.CalculateRemainingBudget(_budget), Is.EqualTo(500));
        }
Пример #3
0
        public void TestSavingsPre()
        {
            _dateProvider.SetToday(new DateTime(2019, 01, 31));

            Assert.That(_budgetService.CalculateSavings(_budget), Is.EqualTo(0));
        }
Пример #4
0
        public void TestBudgetPre()
        {
            _dateProvider.SetToday(new DateTime(2019, 01, 31));

            Assert.That(_budgetService.CalculateRemainingBudget(_budget), Is.EqualTo(300));
        }