private async Task <HexbotResponse> GetHexbot(int count, int width, int height, string seed) { _logger.LogDebug($"Calling hexbot API (count={count}, width={width}, height={height}, seed={seed ?? "null"})..."); var response = await _apiClient.GetHexbot(count, width, height, seed); if (response != null) { _logger.LogDebug($"Received {response.Colors.Count()} color(s) from hexbot API..."); } return(response); }
public async void GetHexbot_Should_Call_IApiRequestProvider_CreateGetRequest() { Dictionary <string, string> queries = null; _requestProvider.CreateGetRequest(Arg.Any <string>(), Arg.Any <Dictionary <string, string> >(), Arg.Do <Dictionary <string, string> >(a => queries = a)); await _client.GetHexbot(null, null, null, null); _requestProvider.Received(1).CreateGetRequest($"{_noopsUrl}/hexbot", Arg.Any <Dictionary <string, string> >(), Arg.Any <Dictionary <string, string> >()); queries.Should().BeEmpty(); }