Exemplo n.º 1
0
        public async void GetStockInfoAsync_ServiceNotAvailableTest(string invalidContent)
        {
            _mockHttpMessageHandler.Clear();
            _mockHttpMessageHandler.When("*").Respond("text/html", invalidContent);

            var trades = CreatePortfolio();

            await Assert.ThrowsAsync <StockServiceException>(() => _service.GetStockInfoAsync(trades));
        }
Exemplo n.º 2
0
        public async Task GetStockInfoData_Test()
        {
            var trades = await _portfolioService.GetAllAsync();

            var result = await _stockQuoteService.GetStockInfoAsync(trades);

            Assert.Equal(2, result.Count());
        }