Skip to content

Commit

Permalink
Merge branch 'main' into madu/added-json-document-writter-for-rsm012
Browse files Browse the repository at this point in the history
  • Loading branch information
MadsDue authored Nov 29, 2024
2 parents 6b320bb + 0b2845d commit f9e80e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion source/OutgoingMessages.Application/UseCases/PeekMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using Energinet.DataHub.EDI.ArchivedMessages.Interfaces.Models;
using Energinet.DataHub.EDI.BuildingBlocks.Domain.Authentication;
using Energinet.DataHub.EDI.BuildingBlocks.Domain.DataHub;
using Energinet.DataHub.EDI.BuildingBlocks.Domain.Models;
using Energinet.DataHub.EDI.OutgoingMessages.Application.Mapping;
using Energinet.DataHub.EDI.OutgoingMessages.Domain.DocumentWriters;
using Energinet.DataHub.EDI.OutgoingMessages.Domain.Models;
Expand Down Expand Up @@ -128,7 +129,7 @@ private async Task<MarketDocument> GenerateMarketDocumentAsync(
authenticatedActor.ActorNumber,
authenticatedActor.ActorRole,
timestamp,
outgoingMessageBundle.BusinessReason,
BusinessReason.FromName(outgoingMessageBundle.BusinessReason).Code,
ArchivedMessageTypeDto.OutgoingMessage,
marketDocumentStream,
outgoingMessageBundle.RelatedToMessageId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ public async Task Given_OutgoingMessage_When_MessageIsPeeked_Then_MessageIsArchi
var expectedFileStorageReference = $"{receiver.ReceiverNumber.Value}/{year:0000}/{month:00}/{day:00}/{archivedMessage!.Id:N}";
var assertProperties = new Dictionary<string, Action<object?>>
{
{ "BusinessReason", businessReason => businessReason.Should().Be(outgoingMessage.BusinessReason) },
{ "BusinessReason", businessReason => businessReason.Should().Be(BusinessReason.FromName(outgoingMessage.BusinessReason).Code) },
{ "CreatedAt", createdAt => createdAt.Should().Be(expectedTimestamp) },
{ "DocumentType", documentType => documentType.Should().Be(outgoingMessage.DocumentType.Name) },
{ "EventIds", eventIds => eventIds.Should().Be(expectedEventId.Value) },
Expand Down

0 comments on commit f9e80e3

Please sign in to comment.