public void WeatherForecastsTest() { var endpoint = new BlazorJsonServerInfo(); var sampleDataClient = endpoint.Provider.GetService <ISampleDataClient>(); var forecasts = sampleDataClient.WeatherForecasts(); Assert.IsTrue(forecasts.Count() == 5); }
public async Task WeatherForecastsTest() { using (var endpoint = new BlazorJsonServerInfo()) { var sampleDataClient = endpoint.Provider.GetService <IWeatherForecastClient>(); var forecasts = await sampleDataClient.GetAsync(); Assert.True(forecasts.Count() == 5); } }