public void TestInitialise()
{
this.subject = new RemainingActualSurplusWidget();
this.criteriaTestData = new GlobalFilterCriteria
{
BeginDate = new DateTime(2015, 10, 20),
EndDate = new DateTime(2015, 11, 19)
};
this.ledgerCalculation = new LedgerCalculation(new FakeLogger());
StatementModelTestDataForThisTest.AccountTypeRepo = new InMemoryAccountTypeRepository();
StatementModelTestDataForThisTest.BudgetBucketRepo = new BucketBucketRepoAlwaysFind();
this.statementTestData = StatementModelTestDataForThisTest.TestDataGenerated();
this.ledgerBookTestData = new LedgerBookBuilder
{
StorageKey = "RemainingActualSurplusWidgetTest.xml",
Modified = new DateTime(2015, 11, 23),
Name = "Smith Budget 2015"
}
.IncludeLedger(LedgerBookTestData.PhoneLedger, 130M)
.IncludeLedger(LedgerBookTestData.CarMtcLedger, 90M)
.IncludeLedger(LedgerBookTestData.PowerLedger)
.AppendReconciliation(
new DateTime(2015, 10, 20),
new BankBalance(LedgerBookTestData.ChequeAccount, 4502.75M))
.WithReconciliationEntries(
entryBuilder =>
{
entryBuilder.WithLedger(LedgerBookTestData.PhoneLedger).HasNoTransactions();
entryBuilder.WithLedger(LedgerBookTestData.CarMtcLedger).HasNoTransactions();
entryBuilder.WithLedger(LedgerBookTestData.PowerLedger)
.AppendTransactions(txnBuilder => { txnBuilder.WithCredit(3000M, "Oct Savings", new DateTime(2015, 10, 20), "automatchref12"); });
})
.Build();
}