public void Reconcile_ShouldAutoMatchTransactionsAndLinkIdToStatementTransaction_GivenTestData5()
{
// The automatched credit ledger transaction from last month should be linked to the statement transaction.
this.testDataStatement = StatementModelTestData.TestData5();
List<Transaction> statementTransactions = this.testDataStatement.AllTransactions.Where(t => t.Reference1 == "agkT9kC").ToList();
Debug.Assert(statementTransactions.Count() == 2);
ActOnTestData5(this.testDataStatement);
LedgerEntry previousMonthLine =
this.subject.Reconciliations.Single(line => line.Date == new DateTime(2013, 08, 15)).Entries.Single(e => e.LedgerBucket.BudgetBucket == StatementModelTestData.InsHomeBucket);
BudgetCreditLedgerTransaction previousLedgerTxn = previousMonthLine.Transactions.OfType<BudgetCreditLedgerTransaction>().Single();
// Assert last month's ledger transaction has been linked to the credit 16/8/13
Assert.AreEqual(statementTransactions.Single(t => t.Amount > 0).Id, previousLedgerTxn.Id);
}