A Ledger Bucket that does not allow funds to accumulate at the end of the month. Any excess funds if not spent, will be transfered to Surplus.
Inheritance: LedgerBucket
Ejemplo n.º 1
0
        public void TwoInstancesWithEquivelantBucketAndAccountAreEqual()
        {
            var bucket1 = new SpentMonthlyExpenseBucket("Foo1", "Foo bar");
            var bucket2 = new SpentMonthlyExpenseBucket("Foo1", "Foo bar");

            var instance1 = new SpentMonthlyLedger
            {
                BudgetBucket = bucket1,
                StoredInAccount = StatementModelTestData.SavingsAccount
            };
            var instance2 = new SpentMonthlyLedger
            {
                BudgetBucket = bucket2,
                StoredInAccount = StatementModelTestData.SavingsAccount
            };
            Assert.AreEqual(instance1, instance2);
            Assert.IsTrue(instance1 == instance2);
        }
Ejemplo n.º 2
0
 static LedgerBookTestData()
 {
     ChequeAccount = StatementModelTestData.ChequeAccount;
     SavingsAccount = StatementModelTestData.SavingsAccount;
     RatesLedger = new SavedUpForLedger { BudgetBucket = new SavedUpForExpenseBucket(TestDataConstants.RatesBucketCode, "Rates "), StoredInAccount = ChequeAccount };
     PowerLedger = new SpentMonthlyLedger { BudgetBucket = new SpentMonthlyExpenseBucket(TestDataConstants.PowerBucketCode, "Power "), StoredInAccount = ChequeAccount };
     PhoneLedger = new SpentMonthlyLedger { BudgetBucket = new SpentMonthlyExpenseBucket(TestDataConstants.PhoneBucketCode, "Poo bar"), StoredInAccount = ChequeAccount };
     WaterLedger = new SpentMonthlyLedger { BudgetBucket = new SpentMonthlyExpenseBucket(TestDataConstants.WaterBucketCode, "Poo bar"), StoredInAccount = ChequeAccount };
     HouseInsLedger = new SpentMonthlyLedger { BudgetBucket = new SpentMonthlyExpenseBucket(TestDataConstants.InsuranceHomeBucketCode, "Poo bar"), StoredInAccount = ChequeAccount };
     HouseInsLedgerSavingsAccount = new SavedUpForLedger { BudgetBucket = new SavedUpForExpenseBucket(TestDataConstants.InsuranceHomeBucketCode, "Poo bar"), StoredInAccount = SavingsAccount };
     CarInsLedger = new SavedUpForLedger { BudgetBucket = new SavedUpForExpenseBucket("INSCAR", "Poo bar"), StoredInAccount = ChequeAccount };
     LifeInsLedger = new SavedUpForLedger { BudgetBucket = new SavedUpForExpenseBucket("INSLIFE", "Poo bar"), StoredInAccount = ChequeAccount };
     CarMtcLedger = new SavedUpForLedger { BudgetBucket = new SavedUpForExpenseBucket(TestDataConstants.CarMtcBucketCode, "Poo bar"), StoredInAccount = ChequeAccount };
     RegoLedger = new SavedUpForLedger { BudgetBucket = new SavedUpForExpenseBucket(TestDataConstants.RegoBucketCode, ""), StoredInAccount = ChequeAccount };
     HairLedger = new SavedUpForLedger { BudgetBucket = new SavedUpForExpenseBucket(TestDataConstants.HairBucketCode, "Hair cuts wheelbarrow."), StoredInAccount = ChequeAccount };
     ClothesLedger = new SavedUpForLedger { BudgetBucket = new SavedUpForExpenseBucket("CLOTHES", ""), StoredInAccount = ChequeAccount };
     DocLedger = new SavedUpForLedger { BudgetBucket = new SavedUpForExpenseBucket(TestDataConstants.DoctorBucketCode, ""), StoredInAccount = ChequeAccount };
     SurplusLedger = new SurplusLedger { StoredInAccount = ChequeAccount };
     SavingsSurplusLedger = new SurplusLedger { StoredInAccount = SavingsAccount };
     SavingsLedger = new SavedUpForLedger { BudgetBucket = new SavedUpForExpenseBucket(TestDataConstants.SavingsBucketCode, "Savings"), StoredInAccount = ChequeAccount };
 }