public void Init()
        {
            AutoMapperConfig.Configure();

            _yahooFinanceService         = new YahooFinanceService();
            _financialCalculationService = new FinancialCalculationService();
            _googleFinanceService        = new GoogleFinanceService(new WebRequestService());
            _portfolioController         = new PortfolioController(_yahooFinanceService, _googleFinanceService, _financialCalculationService);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="PortfolioController"/> class.
        /// </summary>
        /// <param name="yahooFinanceService">
        /// The yahoo finance service.
        /// </param>
        /// <param name="googleFinanceService">
        /// </param>
        /// <param name="financialCalculationService">
        /// The financial Calculation Service.
        /// </param>
        public PortfolioController(IYahooFinanceService yahooFinanceService, IGoogleFinanceService googleFinanceService, IFinancialCalculationService financialCalculationService)
        {
            if (googleFinanceService == null)
            {
                throw new ArgumentNullException(nameof(googleFinanceService));
            }
            if (yahooFinanceService == null)
            {
                throw new ArgumentNullException(nameof(yahooFinanceService));
            }
            if (financialCalculationService == null)
            {
                throw new ArgumentNullException(nameof(financialCalculationService));
            }

            _yahooFinanceService         = yahooFinanceService;
            _googleFinanceService        = googleFinanceService;
            _financialCalculationService = financialCalculationService;
        }
 public void Init()
 {
     AutoMapperConfig.Configure();
     _yahooFinanceService         = new YahooFinanceService();
     _financialCalculationService = new FinancialCalculationService();
 }