示例#1
0
        public void TestIntialise()
        {
            this.mockRuleService = new Mock <ITransactionRuleService>(MockBehavior.Strict);
            this.mockReconciliationConsistency = new Mock <IReconciliationConsistency>();
            this.bucketRepo            = new BucketBucketRepoAlwaysFind();
            this.testDataBudgets       = BudgetModelTestData.CreateCollectionWith1And2();
            this.testDataBudgetContext = new BudgetCurrencyContext(this.testDataBudgets, this.testDataBudgets.CurrentActiveBudget);
            this.testDataStatement     = new StatementModelBuilder()
                                         .TestData5()
                                         .AppendTransaction(new Transaction
            {
                Account         = StatementModelTestData.ChequeAccount,
                Amount          = -23.56M,
                BudgetBucket    = StatementModelTestData.RegoBucket,
                Date            = ReconcileDate.Date.AddDays(-1),
                TransactionType = new NamedTransaction("Foo"),
                Description     = "Last transaction"
            })
                                         .Build();
            this.testDataToDoList = new List <ToDoTask>();
            this.subject          = new ReconciliationCreationManager(this.mockRuleService.Object, this.mockReconciliationConsistency.Object, new FakeLogger());

            this.testDataLedgerBook = LedgerBookTestData.TestData5(() => new LedgerBookTestHarness(new Mock <IReconciliationBuilder>().Object));

            this.mockReconciliationConsistency.Setup(m => m.EnsureConsistency(It.IsAny <LedgerBook>())).Returns(new Mock <IDisposable>().Object);
        }
示例#2
0
        public void TestIntialise()
        {
            this.mockBucketRepo  = new Mock <IBudgetBucketRepository>();
            this.mockRuleService = new Mock <ITransactionRuleService>();
            this.mockReconciliationConsistency = new Mock <IReconciliationConsistency>();
            this.subject = new ReconciliationCreationManager(this.mockRuleService.Object, this.mockReconciliationConsistency.Object, new FakeLogger());

            this.testDataLedgerBook = LedgerBookTestData.TestData5(() => new LedgerBookTestHarness(new Mock <IReconciliationBuilder>().Object));
            this.testDataEntryLine  = this.testDataLedgerBook.Reconciliations.First();
            this.testDataEntryLine.Unlock();

            this.surplusChqLedger = new SurplusLedger {
                StoredInAccount = StatementModelTestData.ChequeAccount
            };
            this.insHomeSavLedger = this.testDataLedgerBook.Ledgers.Single(l => l.BudgetBucket == StatementModelTestData.InsHomeBucket);
            this.phNetChqLedger   = this.testDataLedgerBook.Ledgers.Single(l => l.BudgetBucket == StatementModelTestData.PhoneBucket);
        }