public async Task SearchSymbolTest() { _apiKeyServiceMock.Setup(q => q.GetKey()).Returns(_realKeySrvice.GetKey()); var result = await _alphaVantageServiceReal.SearchSymbolAsync("BabA"); Assert.True(result?.Any() == true); Assert.True(result?.Any(q => q.Symbol.Equals(_testSymbol)) == true); }
public async Task <IActionResult> SearchSymbolAsync(string input) { var result = await _alphaVantageService.SearchSymbolAsync(input); return(Ok(new { input, Data = result, })); }