public InvestmentResult Handle(SimulateInvestmentCommand command)
        {
            var calendarCount = _calendarRepository.GetCountByRange(command.MaturityDate);
            var ettj          = _ettjRepository.GetEttjByType(command.Index, calendarCount.BusinessDays);

            var projectedRate       = GetProjectedRate(ettj, calendarCount.BusinessDays);
            var investmentParameter = new InvestmentParameter(
                command.InvestedAmount, projectedRate,
                calendarCount,
                command.Rate, command.IsTaxFree);

            return(_investmentSimulator.Simulate(investmentParameter));
        }
        public void TestInvestmentNetProfitAmount(InvestmentParameter parameter, decimal netProfitAmount)
        {
            var actualResult = new InvestmentSimulator().Simulate(parameter);

            Assert.AreEqual(netProfitAmount, actualResult.NetAmountProfit);
        }
        public void TestInvestmentCalculations(InvestmentParameter parameter, InvestmentResult expectedResult)
        {
            var actualResult = new InvestmentSimulator().Simulate(parameter);

            CheckEquality(expectedResult, actualResult);
        }