コード例 #1
0
        public async Task Get_power_breakdown_live_zone_Async(
            string zone,
            LivePowerBreakdown livePowerBreakdown)
        {
            httpFacade
            .GetAsync <LivePowerBreakdown>(Arg.Any <Uri>())
            .Returns(livePowerBreakdown);

            var result = await sut
                         .GetLivePowerBreakdownAsync(zone)
                         .ConfigureAwait(false);

            result.Should().NotBeNull();
            result.Should().Be(livePowerBreakdown);
        }
コード例 #2
0
        public async Task Get_power_breakdown_live_lat_long_Async(
            double latitude,
            double longitude,
            LivePowerBreakdown livePowerBreakdown)
        {
            httpFacade
            .GetAsync <LivePowerBreakdown>(Arg.Any <Uri>())
            .Returns(livePowerBreakdown);

            var result = await sut
                         .GetLivePowerBreakdownAsync(latitude, longitude)
                         .ConfigureAwait(false);

            result.Should().NotBeNull();
            result.Should().Be(livePowerBreakdown);
        }