public async Task DayStatisticsReader_ForSmallResponse_CreatesCorrectObjects() { IDayStatistics result = await TestUtility.ExecuteObjectReaderByTypeAsync <IDayStatistics>(STATUS_RESPONSE_DAYSTATISTICS_SMALL); Assert.Multiple(() => { Assert.That(result.EnergyGeneration, Is.EqualTo(334)); Assert.That(result.PowerGeneration, Is.EqualTo(1)); Assert.That(result.PeakPower, Is.EqualTo(191)); Assert.That(result.PeakTime, Is.EqualTo(new TimeSpan(11, 0, 0))); }); }
public async Task DayStatisticsReader_ForMediumResponse_CreatesCorrectObjects() { IDayStatistics result = await TestUtility.ExecuteObjectReaderByTypeAsync <IDayStatistics>(STATUS_RESPONSE_DAYSTATISTICS_MEDIUM); Assert.Multiple(() => { Assert.That(result.EnergyGeneration, Is.EqualTo(334)); Assert.That(result.PowerGeneration, Is.EqualTo(2)); Assert.That(result.PeakPower, Is.EqualTo(82)); Assert.That(result.PeakTime, Is.EqualTo(new TimeSpan(14, 40, 0))); Assert.That(result.EnergyConsumption, Is.EqualTo(5811)); Assert.That(result.PowerConsumption, Is.EqualTo(417)); Assert.That(result.StandbyPower, Is.EqualTo(255)); Assert.That(result.StandbyPowerTime, Is.EqualTo(new TimeSpan(15, 5, 0))); }); }
public async Task DayStatisticsReader_ForFullResponse_CreatesCorrectObjects() { IDayStatistics result = await TestUtility.ExecuteObjectReaderByTypeAsync <IDayStatistics>(STATUS_RESPONSE_DAYSTATISTICS_FULL); Assert.Multiple(() => { Assert.That(result.EnergyGeneration, Is.EqualTo(35302)); Assert.That(result.PowerGeneration, Is.EqualTo(3)); Assert.That(result.PeakPower, Is.EqualTo(5369)); Assert.That(result.PeakTime, Is.EqualTo(new TimeSpan(12, 45, 0))); Assert.That(result.EnergyConsumption, Is.EqualTo(31476)); Assert.That(result.PowerConsumption, Is.EqualTo(606)); Assert.That(result.StandbyPower, Is.EqualTo(495)); Assert.That(result.StandbyPowerTime, Is.EqualTo(new TimeSpan(9, 35, 0))); Assert.That(result.MinimumTemperature, Is.EqualTo(18.1d)); Assert.That(result.MaximumTemperature, Is.EqualTo(26.6d)); Assert.That(result.AverageTemperature, Is.EqualTo(21.7d)); }); }