public void Arrange() { _expectedProjection = new List <Domain.Entities.AccountProjection>(); for (int i = -1; i < 14; i++) { var startDate = _expectedGenerationDate.AddMonths(i); _expectedProjection.Add( new Domain.Entities.AccountProjection { AccountId = ExpectedAccountId, ExpiredFunds = 150.55m, Month = (short)startDate.Month, Year = startDate.Year, ProjectionCreationDate = _expectedGenerationDate, LevyFundsIn = DefaultLevyFundsIn, TransferInCostOfTraining = DefaultTransferInCostOfTraining, TransferInCompletionPayments = DefaultTransferInCompletionPayments, LevyFundedCostOfTraining = DefaultLevyFundedCostOfTraining, TransferOutCostOfTraining = DefaultTransferOutCostOfTraining, LevyFundedCompletionPayments = DefaultLevyFundedCompletionPayments, TransferOutCompletionPayments = DefaultTransferOutCompletionPayments } ); } _accountProjectionRepository = new Mock <IAccountProjectionRepository>(); _accountProjectionRepository .Setup(x => x.GetAccountProjectionByAccountId(ExpectedAccountId)) .ReturnsAsync(_expectedProjection); _accountProjectionService = new AccountProjectionService(_accountProjectionRepository.Object); }
public void ForwardProjectsFixedIncomeToAccount(ProjectAccountValueTestCase tc) { var uut = new AccountProjectionService(); var result = AccountProjectionService.ForwardProjectFixedIncomeToAccountValue( tc.Projection.Account, tc.Projection.NextPayday, tc.Projection.Date, tc.Projection.Account.FixedRecurringIncome); Assert.AreEqual( tc.Projection.ProjectedAccountValue, result.ProjectedAccountValue, 0.0000001); }
public void Arrange() { _expectedProjection = new List <Domain.Entities.AccountProjection> { new Domain.Entities.AccountProjection { AccountId = ExpectedAccountId, ExpiredFunds = 150.55m, Month = 10, Year = 2018, ProjectionCreationDate = _expectedGenerationDate }, new Domain.Entities.AccountProjection { AccountId = ExpectedAccountId, ExpiredFunds = 0m, Month = 7, Year = 2018, ProjectionCreationDate = _expectedGenerationDate }, new Domain.Entities.AccountProjection { AccountId = ExpectedAccountId, ExpiredFunds = 170.55m, Month = 8, Year = 2018, ProjectionCreationDate = _expectedGenerationDate } }; _accountProjectionRepository = new Mock <IAccountProjectionRepository>(); _accountProjectionRepository .Setup(x => x.GetAccountProjectionByAccountId(ExpectedAccountId)) .ReturnsAsync(_expectedProjection); _accountProjectionService = new AccountProjectionService(_accountProjectionRepository.Object); }