public static LedgerBook TestData4()
{
var book = new LedgerBook(new ReconciliationBuilder(new FakeLogger()))
{
Name = "Test Data 4 Book",
Modified = new DateTime(2013, 12, 16),
StorageKey = "C:\\Folder\\book1.xml"
};
var list = new List<LedgerEntryLine>
{
CreateLine(new DateTime(2013, 06, 15), new[] { new BankBalance(StatementModelTestData.ChequeAccount, 2500) }, "Lorem ipsum").SetEntriesForTesting(
new List
<LedgerEntry>
{
CreateLedgerEntry(HairLedger).SetTransactionsForTesting(
new List<LedgerTransaction>
{
new BudgetCreditLedgerTransaction { Amount = 55M, Narrative = "Budgeted amount" },
new CreditLedgerTransaction { Amount = -45M, Narrative = "Hair cut" }
}),
CreateLedgerEntry(PowerLedger).SetTransactionsForTesting(
new List<LedgerTransaction>
{
new BudgetCreditLedgerTransaction { Amount = 140M, Narrative = "Budgeted amount" },
new CreditLedgerTransaction { Amount = -123.56M, Narrative = "Power bill" }
}),
CreateLedgerEntry(PhoneLedger).SetTransactionsForTesting(
new List<LedgerTransaction>
{
new BudgetCreditLedgerTransaction { Amount = 95M, Narrative = "Budgeted amount" },
new CreditLedgerTransaction { Amount = -86.43M, Narrative = "Pay phones" }
})
})
};
LedgerEntry previousHairEntry = list.Last().Entries.Single(e => e.LedgerBucket.BudgetBucket.Code == TestDataConstants.HairBucketCode);
LedgerEntry previousPowerEntry = list.Last().Entries.Single(e => e.LedgerBucket.BudgetBucket.Code == TestDataConstants.PowerBucketCode);
LedgerEntry previousPhoneEntry = list.Last().Entries.Single(e => e.LedgerBucket.BudgetBucket.Code == TestDataConstants.PhoneBucketCode);
list.Add(
CreateLine(new DateTime(2013, 07, 15), new[] { new BankBalance(StatementModelTestData.ChequeAccount, 3700) }, "dolor amet set").SetEntriesForTesting(
new List
<LedgerEntry>
{
CreateLedgerEntry(HairLedger, previousHairEntry.Balance).SetTransactionsForTesting(
new List<LedgerTransaction>
{
new BudgetCreditLedgerTransaction { Amount = 55M, Narrative = "Budgeted amount" }
}),
CreateLedgerEntry(PowerLedger, previousPowerEntry.Balance).SetTransactionsForTesting(
new List<LedgerTransaction>
{
new BudgetCreditLedgerTransaction { Amount = 140M, Narrative = "Budgeted amount" },
new CreditLedgerTransaction { Amount = -145.56M, Narrative = "Power bill" }
}),
CreateLedgerEntry(PhoneLedger, previousPhoneEntry.Balance).SetTransactionsForTesting(
new List<LedgerTransaction>
{
new BudgetCreditLedgerTransaction { Amount = 95M, Narrative = "Budgeted amount" },
new CreditLedgerTransaction { Amount = -66.43M, Narrative = "Pay phones" }
})
}));
previousHairEntry = list.Last().Entries.Single(e => e.LedgerBucket.BudgetBucket.Code == TestDataConstants.HairBucketCode);
previousPowerEntry = list.Last().Entries.Single(e => e.LedgerBucket.BudgetBucket.Code == TestDataConstants.PowerBucketCode);
previousPhoneEntry = list.Last().Entries.Single(e => e.LedgerBucket.BudgetBucket.Code == TestDataConstants.PhoneBucketCode);
LedgerEntryLine line = CreateLine(
new DateTime(2013, 08, 15),
new[] { new BankBalance(StatementModelTestData.ChequeAccount, 2750), new BankBalance(StatementModelTestData.SavingsAccount, 200) },
"The quick brown fox jumped over the lazy dog").SetEntriesForTesting(
new List<LedgerEntry>
{
CreateLedgerEntry(HairLedger, previousHairEntry.Balance).SetTransactionsForTesting(
new List<LedgerTransaction>
{
new BudgetCreditLedgerTransaction { Amount = 55M, Narrative = "Budgeted amount" }
}),
CreateLedgerEntry(PowerLedger, previousPowerEntry.Balance).SetTransactionsForTesting(
new List<LedgerTransaction>
{
new BudgetCreditLedgerTransaction { Amount = 140M, Narrative = "Budgeted amount" },
new CreditLedgerTransaction { Amount = -98.56M, Narrative = "Power bill" }
}),
CreateLedgerEntry(PhoneLedger, previousPhoneEntry.Balance).SetTransactionsForTesting(
new List<LedgerTransaction>
{
new BudgetCreditLedgerTransaction { Amount = 95M, Narrative = "Budgeted amount" },
new CreditLedgerTransaction { Amount = -67.43M, Narrative = "Pay phones" }
})
});
line.BalanceAdjustment(-550, "Credit card payment yet to go out.", StatementModelTestData.ChequeAccount);
list.Add(line);
book.SetReconciliations(list);
Finalise(book);
return book;
}