public GetMetersValue ( List |
||
meters | List |
|
spatialRecord | AgGateway.ADAPT.ApplicationDataModel.LoggedData.SpatialRecord | |
리턴 |
public void GivenMetersWithStartAt382WhenGetMetersValueThenValuesCorrect() { SpatialRecord spatialRecord; var meters = CreateMeters(out spatialRecord, 241); var creator = new CondensedSectionOverrideStateMeterCreator(382); var result = creator.GetMetersValue(meters, spatialRecord); Assert.AreEqual(0x44444444, result); }
public void GivenMetersWithStartAt367AndUndefinedWhenGetMetersValueThenValuesCorrect() { var meters = new List<WorkingData>(); for (int i = 1; i < 17; i++) { meters.Add(new ISOEnumeratedMeter { DeviceElementUseId = i }); } var spatialRecord = new SpatialRecord(); for (var i = 0; i < 16; i++) { if (i % 2 == 0) spatialRecord.SetMeterValue(meters[i], new EnumeratedValue { Value = DefinedTypeEnumerationInstanceList.dtiSunny.ToModelEnumMember() }); else spatialRecord.SetMeterValue(meters[i], new EnumeratedValue { Value = DefinedTypeEnumerationInstanceList.dtiPrescriptionOverridden.ToModelEnumMember() }); } var creator = new CondensedSectionOverrideStateMeterCreator(367); var result = creator.GetMetersValue(meters, spatialRecord); Assert.AreEqual(0x77777777, result); }