@@ -54,6 +54,7 @@ public class RemoteAppExecutionPlugInsStepDefinitions
5454 private readonly RabbitMQMessagePublisherService _messagePublisher ;
5555 private readonly InformaticsGatewayConfiguration _informaticsGatewayConfiguration ;
5656 private Dictionary < string , DicomFile > _originalDicomFiles ;
57+ private ExportRequestEvent _exportRequestEvent ;
5758 private readonly Assertions _assertions ;
5859
5960 public RemoteAppExecutionPlugInsStepDefinitions (
@@ -113,7 +114,7 @@ public async Task AStudyThatIsExportedToTheTestHost()
113114 await _dataSinkMinio . SendAsync ( _dataProvider ) ;
114115
115116 // Emit a export request event
116- var exportRequestEvent = new ExportRequestEvent
117+ _exportRequestEvent = new ExportRequestEvent
117118 {
118119 CorrelationId = Guid . NewGuid ( ) . ToString ( ) ,
119120 Destinations = new [ ] { _dicomDestination } ,
@@ -123,12 +124,12 @@ public async Task AStudyThatIsExportedToTheTestHost()
123124 WorkflowInstanceId = Guid . NewGuid ( ) . ToString ( ) ,
124125 } ;
125126
126- exportRequestEvent . PluginAssemblies . Add ( typeof ( ExternalAppOutgoing ) . AssemblyQualifiedName ) ;
127+ _exportRequestEvent . PluginAssemblies . Add ( typeof ( ExternalAppOutgoing ) . AssemblyQualifiedName ) ;
127128
128129 var message = new JsonMessage < ExportRequestEvent > (
129- exportRequestEvent ,
130+ _exportRequestEvent ,
130131 MessageBrokerConfiguration . InformaticsGatewayApplicationId ,
131- exportRequestEvent . CorrelationId ,
132+ _exportRequestEvent . CorrelationId ,
132133 string . Empty ) ;
133134
134135 _receivedExportCompletedMessages . ClearMessages ( ) ;
@@ -222,6 +223,11 @@ await storeScu.SendAsync(
222223 [ Then ( @"ensure the original study and the received study are the same" ) ]
223224 public async Task EnsureTheOriginalStudyAndTheReceivedStudyAreTheSameAsync ( )
224225 {
226+ var workflowRequestEvent = _receivedWorkflowRequestMessages . Messages [ 0 ] . ConvertTo < WorkflowRequestEvent > ( ) ;
227+ _exportRequestEvent . CorrelationId . Should ( ) . Be ( _receivedWorkflowRequestMessages . Messages [ 0 ] . CorrelationId ) ;
228+ _exportRequestEvent . CorrelationId . Should ( ) . Be ( workflowRequestEvent . CorrelationId ) ;
229+ _exportRequestEvent . WorkflowInstanceId . Should ( ) . Be ( workflowRequestEvent . WorkflowInstanceId ) ;
230+ _exportRequestEvent . ExportTaskId . Should ( ) . Be ( workflowRequestEvent . TaskId ) ;
225231 await _assertions . ShouldRestoreAllDicomMetaata ( _receivedWorkflowRequestMessages . Messages , _originalDicomFiles , DefaultDicomTags . ToArray ( ) ) . ConfigureAwait ( false ) ;
226232 }
227233 }
0 commit comments