public async Task Get_carbon_intensity_live_zone_Async( string zone, LiveCarbonIntensity data) { httpFacade .GetAsync <LiveCarbonIntensity>(Arg.Any <Uri>()) .Returns(data); var result = await sut .GetLiveCarbonIntensityAsync(zone) .ConfigureAwait(false); result.Should().NotBeNull(); result.Should().Be(data); }
public async Task Get_carbon_intensity_live_lat_long_Async( double latitude, double longitude, LiveCarbonIntensity data) { httpFacade .GetAsync <LiveCarbonIntensity>(Arg.Any <Uri>()) .Returns(data); var result = await sut .GetLiveCarbonIntensityAsync(latitude, longitude) .ConfigureAwait(false); result.Should().NotBeNull(); result.Should().Be(data); }
public async Task OnGet() { LiveCarbonIntensity = await _electricityMapClient.GetLiveCarbonIntensityAsync(ZoneConstants.Denmark_East_Denmark); }