A spent monthly expense bucket. This kind of bucket will not accumulate funds from month to month. Any unspent funds at the end of the month are transfered to surplus.
Inheritance: BillToPayExpenseBucket
        public void FetchBudgetBucketWithValidParamsShouldReturnBucketObject()
        {
            BankImportUtilities subject = CreateSubject();
            string[] testArray = CreateTestArray();
            var expectedResult = new SpentMonthlyExpenseBucket("FUEL", "Fuel");
            BucketRepositoryMock.Setup(m => m.GetByCode("FUEL")).Returns(expectedResult);

            BudgetBucket result = subject.FetchBudgetBucket(testArray, 2, BucketRepositoryMock.Object);

            BucketRepositoryMock.Verify();
            Assert.AreSame(expectedResult, result);
        }
示例#2
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);
        }