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); }
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); }