public async Task MakeRequest() { var request = _mockHttp .When(HttpMethod.Get, "http://iss.moex.com/iss/engines/stock/markets/shares/boards/TQBR/securities/YNDX.json?iss.meta=off&iss.only=securities,marketdata") .Respond("application/json", "YNDX"); var response = await _stockMarketAPI.FindStock("YNDX"); Assert.AreEqual("YNDX", response.JsonContent); Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); Assert.AreEqual(1, _mockHttp.GetMatchCount(request)); }
public async Task <AssetResponse> GetStockData(string codeStock) { var response = await _stockMarketApi.FindStock(codeStock); return(GetData <AssetResponse>(response)); }