BudgetAnalyser.Engine.UnitTest.Ledger.LedgerBucketTest.DictionaryTest C# (CSharp) Method

DictionaryTest() private method

private DictionaryTest ( ) : void
return void
        public void DictionaryTest()
        {
            LedgerBucket instance1 = LedgerBookTestData.HairLedger;

            var dictionary = new Dictionary<LedgerBucket, LedgerBucket>
            {
                { instance1, instance1 }
            };

            LedgerBucket instance2 = new SavedUpForLedger
            {
                BudgetBucket = StatementModelTestData.HairBucket,
                StoredInAccount = LedgerBookTestData.ChequeAccount
            };

            // Should already contain this, its the same code.
            Assert.IsTrue(dictionary.ContainsKey(instance2));

            LedgerBucket instance3 = new SavedUpForLedger
            {
                BudgetBucket = new SavedUpForExpenseBucket("HAIRCUT", "Foo bar"),
                StoredInAccount = LedgerBookTestData.ChequeAccount
            };

            Assert.IsTrue(dictionary.ContainsKey(instance3));
        }