コード例 #1
0
        public void RecurringTransactionWithoutQuantityShouldHaveFutureTransactionDependingOnPeriodicityForOneYear(Periodicity periodicity, int assertCount)
        {
            var rT     = new RecurringTransactionFactory().WithCreditDefaultValues().WithPeriodicity(periodicity).WithStartDate(DateTime.Today.AddDays(-1)).WithCurrency(new Currency()).Build();
            var future = rT.GetFutureTransaction();

            future.Should().HaveCount(assertCount);
        }
コード例 #2
0
        public void RecurringTransactionWithQuantityOneShouldHaveOneFutureTransaction()
        {
            var rT = new RecurringTransactionFactory().WithCreditDefaultValues().WithQuantity(1).WithCurrency(new Currency()).Build();
            var futureTransactions = rT.GetFutureTransaction();

            futureTransactions.Should().HaveCount(1);
        }
コード例 #3
0
        public void RecurringTransactionWithTransactionRegisteredOnCurrentPeriodShouldReturnOnlyFuture(Periodicity periodicity, int assertCount)
        {
            var passedTransactionDate = DateTime.Today;
            var recurStartDate        = DateTime.Today.AddDays(-1);
            var rT     = new RecurringTransactionFactory().WithCreditDefaultValues().WithPeriodicity(periodicity).WithStartDate(recurStartDate).WithCurrency(new Currency()).WithPassedTransactionOn(passedTransactionDate).Build();
            var future = rT.GetFutureTransaction();
            var dates  = GetLimitDates(periodicity, passedTransactionDate);

            future.Should().HaveCount(assertCount);
            future.Where(f => dates.Item1 < f.Date && f.Date < dates.Item2).Should().BeEmpty();
        }