@@ -54,6 +54,7 @@ public class RemoteAppExecutionPlugInsStepDefinitions
54
54
private readonly RabbitMQMessagePublisherService _messagePublisher ;
55
55
private readonly InformaticsGatewayConfiguration _informaticsGatewayConfiguration ;
56
56
private Dictionary < string , DicomFile > _originalDicomFiles ;
57
+ private ExportRequestEvent _exportRequestEvent ;
57
58
private readonly Assertions _assertions ;
58
59
59
60
public RemoteAppExecutionPlugInsStepDefinitions (
@@ -113,7 +114,7 @@ public async Task AStudyThatIsExportedToTheTestHost()
113
114
await _dataSinkMinio . SendAsync ( _dataProvider ) ;
114
115
115
116
// Emit a export request event
116
- var exportRequestEvent = new ExportRequestEvent
117
+ _exportRequestEvent = new ExportRequestEvent
117
118
{
118
119
CorrelationId = Guid . NewGuid ( ) . ToString ( ) ,
119
120
Destinations = new [ ] { _dicomDestination } ,
@@ -123,12 +124,12 @@ public async Task AStudyThatIsExportedToTheTestHost()
123
124
WorkflowInstanceId = Guid . NewGuid ( ) . ToString ( ) ,
124
125
} ;
125
126
126
- exportRequestEvent . PluginAssemblies . Add ( typeof ( ExternalAppOutgoing ) . AssemblyQualifiedName ) ;
127
+ _exportRequestEvent . PluginAssemblies . Add ( typeof ( ExternalAppOutgoing ) . AssemblyQualifiedName ) ;
127
128
128
129
var message = new JsonMessage < ExportRequestEvent > (
129
- exportRequestEvent ,
130
+ _exportRequestEvent ,
130
131
MessageBrokerConfiguration . InformaticsGatewayApplicationId ,
131
- exportRequestEvent . CorrelationId ,
132
+ _exportRequestEvent . CorrelationId ,
132
133
string . Empty ) ;
133
134
134
135
_receivedExportCompletedMessages . ClearMessages ( ) ;
@@ -222,6 +223,11 @@ await storeScu.SendAsync(
222
223
[ Then ( @"ensure the original study and the received study are the same" ) ]
223
224
public async Task EnsureTheOriginalStudyAndTheReceivedStudyAreTheSameAsync ( )
224
225
{
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 ) ;
225
231
await _assertions . ShouldRestoreAllDicomMetaata ( _receivedWorkflowRequestMessages . Messages , _originalDicomFiles , DefaultDicomTags . ToArray ( ) ) . ConfigureAwait ( false ) ;
226
232
}
227
233
}
0 commit comments