public void Setup() { var mockHttp = new MockHttpMessageHandler(); var client = mockHttp.ToHttpClient(); var stockMarketAPI = new StockMarketAPI(client); var stockMarketData = new StockMarketData(stockMarketAPI); TestHelpers.MockStockData(mockHttp); TestHelpers.MockFondData(mockHttp); TestHelpers.MockBondData(mockHttp); TestHelpers.MockDividendData(mockHttp); TestHelpers.MockCouponsData(mockHttp); var context = TestHelpers.GetMockFinanceDbContext(); TestHelpers.SeedOperations1(context); _financeDataService = new FinanceDataService(context); var assetFactory = new AssetsFactory(_financeDataService, stockMarketData); var balanceService = new BalanceService(_financeDataService); _marketService = new MarketService(_financeDataService, assetFactory, balanceService); _portfolioService = new PortfolioService(_financeDataService, balanceService, assetFactory); }
public void Setup() { _mockHttp = new MockHttpMessageHandler(); var client = _mockHttp.ToHttpClient(); var stockMarketAPI = new StockMarketAPI(client); _stockMarketData = new StockMarketData(stockMarketAPI); }
public void Setup() { _mockHttp = new MockHttpMessageHandler(); var client = _mockHttp.ToHttpClient(); var stockMarketAPI = new StockMarketAPI(client); MockData(); var stockMarketData = new StockMarketData(stockMarketAPI); _graphService = new GraphService(stockMarketData); }
public void Setup() { var mockHttp = new MockHttpMessageHandler(); var client = mockHttp.ToHttpClient(); var stockMarketAPI = new StockMarketAPI(client); var stockMarketData = new StockMarketData(stockMarketAPI); TestHelpers.MockStockData(mockHttp); _data = stockMarketData.GetStockData("YNDX").Result; }
public void Setup() { var mockHttp = new MockHttpMessageHandler(); var client = mockHttp.ToHttpClient(); TestHelpers.MockBondData(mockHttp); TestHelpers.MockCouponsData(mockHttp); var stockMarketAPI = new StockMarketAPI(client); _stockMarketData = new StockMarketData(stockMarketAPI); var context = TestHelpers.GetMockFinanceDbContext(); _financeDataService = new FinanceDataService(context); }
public void Setup() { var mockHttp = new MockHttpMessageHandler(); var client = mockHttp.ToHttpClient(); var stockMarketAPI = new StockMarketAPI(client); var stockMarketData = new StockMarketData(stockMarketAPI); TestHelpers.MockStockData(mockHttp); TestHelpers.MockFondData(mockHttp); TestHelpers.MockDividendData(mockHttp); var context = TestHelpers.GetMockFinanceDbContext(); TestHelpers.SeedOperations1(context); var financeDataService = new FinanceDataService(context); _assetFactory = new AssetsFactory(financeDataService, stockMarketData); }
public void Setup() { _mockHttp = new MockHttpMessageHandler(); var client = _mockHttp.ToHttpClient(); var stockMarketAPI = new StockMarketAPI(client); MockData(); var stockMarketData = new StockMarketData(stockMarketAPI); var context = TestHelpers.GetMockFinanceDbContext(); TestHelpers.SeedOperations1(context); var financeDataService = new FinanceDataService(context); TestHelpers.MockStockData(_mockHttp); TestHelpers.MockFondData(_mockHttp); TestHelpers.MockBondData(_mockHttp); TestHelpers.MockDividendData(_mockHttp); TestHelpers.MockCouponsData(_mockHttp); _searchService = new SearchService(stockMarketData, financeDataService); }
public async Task Setup() { var mockHttp = new MockHttpMessageHandler(); var client = mockHttp.ToHttpClient(); var stockMarketApi = new StockMarketAPI(client); var stockMarketData = new StockMarketData(stockMarketApi); var context = TestHelpers.GetMockFinanceDbContext(); _financeDataService = new FinanceDataService(context); var assetFactory = new AssetsFactory(_financeDataService, stockMarketData); _balanceService = new BalanceService(_financeDataService); TestHelpers.SeedApp(context); _portfolioService = new PortfolioService(_financeDataService, _balanceService, assetFactory); TestHelpers.MockStockData(mockHttp); TestHelpers.MockFondData(mockHttp); TestHelpers.MockBondData(mockHttp); TestHelpers.SeedOperations2(context); }