public HomeController(ILogger <HomeController> logger, CovidClient covidClient, NasaClient nasaClient, SpaceXClient spaceXClient, OxfordDictionaryClient oxfordDictionaryClient) { _logger = logger; _covidClient = covidClient; _nasaClient = nasaClient; _spaceXClient = spaceXClient; _oxfordDictionaryClient = oxfordDictionaryClient; }
public async Task GetLocationsAsync() { var restClientMock = MockRestClient(HttpStatusCode.OK, new LocationsResponse()); var client = new CovidClient(restClientMock); var locations = await client.GetLocationsAsync(); Assert.Null(locations); }
public HomeController( ILogger <HomeController> logger, CovidClient covidClient, Stocks.StocksClient stocksClient) { _stocksClient = stocksClient; _logger = logger; this.covidClient = covidClient; }
public async Task GetLatestAsync() { CovidClient c = new CovidClient(); var latest = await c.GetLatestAsync(); Assert.NotNull(latest); Assert.True(latest.Confirmed > 0); Assert.True(latest.Deaths > 0); }
public async Task GetLocationsAsync() { CovidClient c = new CovidClient(); var locations = await c.GetLocationsAsync(); Assert.NotNull(locations); Assert.NotEmpty(locations); Assert.True(locations.Count > 80); }
public TimedHostedService( CovidClient covidClient, Covid19ApiClient covid19ApiClient, ILogger <TimedHostedService> logger) { _covidClient = covidClient; _covid19ApiClient = covid19ApiClient; _logger = logger; }
public async Task GetLocationAsync() { CovidClient c = new CovidClient(); var location = await c.GetLocationAsync(12, includeTimeline : true); Assert.NotNull(location); Assert.Equal(12, location.Id); Assert.NotNull(location.Timelines); Assert.NotNull(location.Timelines.Confirmed); Assert.NotEmpty(location.Timelines.Confirmed.History); }
public LocationTracker( CovidClient covidClient, Covid19ApiClient covid19ApiClient, IServiceManager serviceManagerBuilder, ILogger <TimedHostedService> logger) { _covidClient = covidClient; _covid19ApiClient = covid19ApiClient; _signalRServiceManager = serviceManagerBuilder; _logger = logger; }
public ColostateCovidClient() { RestClient client = new RestClient(); Covid = new CovidClient(client); }