Ejemplo n.º 1
0
        public async Task SystemReader_ForResponseWithIncompleteExtendedProperties_CreatesCorrectObject()
        {
            ISystem result = await TestUtility.ExecuteObjectReaderByTypeAsync <ISystem>(SYSTEM_RESPONSE_WITH_MINIMALEXTENDEDDATA);

            ExtendedDataConfiguration secondDataConfig = result.ExtendedDataConfig[1];
            ExtendedDataConfiguration thirdDataConfig  = result.ExtendedDataConfig[2];

            Assert.Multiple(() =>
            {
                Assert.That(result.ExtendedDataConfig, Has.Exactly(4).Items);
                Assert.That(result.ExtendedDataConfig.First().Label, Is.EqualTo("DC-1 Voltage"));
                Assert.That(result.ExtendedDataConfig.First().Unit, Is.EqualTo("V"));
                Assert.That(secondDataConfig.Label, Is.EqualTo("DC-2 Voltage"));
                Assert.That(secondDataConfig.Unit, Is.Empty);
                Assert.That(thirdDataConfig.Label, Is.Empty);
                Assert.That(thirdDataConfig.Unit, Is.EqualTo("°C"));
                Assert.That(result.ExtendedDataConfig.Last().Label, Is.EqualTo("DC-1 Power (2x13x290Wp)"));
                Assert.That(result.ExtendedDataConfig.Last().Unit, Is.EqualTo("W"));
                Assert.That(result.MonthlyGenerationEstimates[PVMonth.October], Is.EqualTo(159));
                Assert.That(result.MonthlyGenerationEstimates[PVMonth.August], Is.EqualTo(354));
                Assert.That(result.MonthlyConsumptionEstimates[PVMonth.February], Is.EqualTo(350));
                Assert.That(result.MonthlyConsumptionEstimates[PVMonth.August], Is.EqualTo(175));
            });
        }
Ejemplo n.º 2
0
 public bool ExtendedDataConfiguration_EqualsByObject_ReturnsValueEquality(ExtendedDataConfiguration configuration1, object configuration2)
 {
     return(configuration1.Equals(configuration2));
 }
Ejemplo n.º 3
0
 public bool ExtendedDataConfiguration_EqualsByType_ReturnsValueEquality(ExtendedDataConfiguration configuration1, ExtendedDataConfiguration configuration2)
 {
     return(configuration1.Equals(configuration2));
 }
Ejemplo n.º 4
0
 public bool ExtendedDataConfiguration_OperatorNotEquals_ReturnsValueEquality(ExtendedDataConfiguration configuration1, ExtendedDataConfiguration configuration2)
 {
     return(configuration1 != configuration2);
 }
Ejemplo n.º 5
0
 public bool ExtendedDataConfiguration_GetHashCode_ReturnsEqualHashesForEqualValues(ExtendedDataConfiguration configuration1, ExtendedDataConfiguration configuration2)
 {
     return(configuration1.GetHashCode() == configuration2.GetHashCode());
 }