From b15d665c0a832b31653af4758ac6ffa1498f312b Mon Sep 17 00:00:00 2001 From: Mathias Ormstrup Bjerregaard Date: Fri, 6 Dec 2024 08:39:41 +0100 Subject: [PATCH] feat: Typify MDFMPMS-dto in IOMC --- ...dDateForMeasurementPointCimJsonDocumentWriter.cs | 8 ++++---- ...edDateForMeasurementPointCimXmlDocumentWriter.cs | 6 +++--- ...edDateForMeasurementPointMarketActivityRecord.cs | 8 ++++---- ...eteredDataForMeasurementPointMessageSeriesDto.cs | 6 +++--- ...itializeMeteredDataForMeasurementPointHandler.cs | 4 ++-- .../MeteredDateForMeasurementPointBuilder.cs | 8 ++++---- ...redDateForMeasurementPointDocumentWriterTests.cs | 13 +++++++------ .../OutgoingMessages/RSM012/SampleData.cs | 12 ++++++------ 8 files changed, 33 insertions(+), 32 deletions(-) diff --git a/source/OutgoingMessages.Domain/DocumentWriters/RSM012/MeteredDateForMeasurementPointCimJsonDocumentWriter.cs b/source/OutgoingMessages.Domain/DocumentWriters/RSM012/MeteredDateForMeasurementPointCimJsonDocumentWriter.cs index 9606e4007..29c186afc 100644 --- a/source/OutgoingMessages.Domain/DocumentWriters/RSM012/MeteredDateForMeasurementPointCimJsonDocumentWriter.cs +++ b/source/OutgoingMessages.Domain/DocumentWriters/RSM012/MeteredDateForMeasurementPointCimJsonDocumentWriter.cs @@ -69,13 +69,13 @@ private Document ParseFrom(OutgoingMessageHeader header, IReadOnlyCollection "E17"; - public static string? OriginalTransactionIdReferenceId => "C1875000"; + public static TransactionId? OriginalTransactionIdReferenceId => TransactionId.From("C1875000"); public static string Product => "8716867000030"; - public static string QuantityMeasureUnit => MeasurementUnit.Kwh.Code; + public static MeasurementUnit QuantityMeasureUnit => MeasurementUnit.Kwh; - public static string RegistrationDateTime => "2022-12-17T07:30:00Z"; + public static Instant RegistrationDateTime => InstantPattern.General.Parse("2022-12-17T07:30:00Z").Value; - public static string Resolution => "PT1H"; + public static Resolution Resolution => Resolution.Hourly; - public static string StartedDateTime => "2022-08-15T22:00Z"; + public static Instant StartedDateTime => InstantPattern.General.Parse("2022-08-15T22:00:00Z").Value; - public static string EndedDateTime => "2022-08-15T04:00Z"; + public static Instant EndedDateTime => InstantPattern.General.Parse("2022-08-15T04:00:00Z").Value; public static IReadOnlyList Points => new List {