File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
src/TaskManager/Plug-ins/AideClinicalReview
tests/IntegrationTests/TaskManager.IntegrationTests/Support Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -88,9 +88,13 @@ private void Initialize()
8888 _workflowName = Event . TaskPluginArguments [ Keys . WorkflowName ] ;
8989 }
9090
91- if ( Event . TaskPluginArguments . ContainsKey ( Keys . Notifications ) )
91+ if ( Event . TaskPluginArguments . ContainsKey ( Keys . Notifications ) && Boolean . TryParse ( Event . TaskPluginArguments [ Keys . Notifications ] , out var result ) )
9292 {
93- _notifications = Boolean . TryParse ( Event . TaskPluginArguments [ Keys . Notifications ] , out bool result ) ;
93+ _notifications = result ;
94+ }
95+ else
96+ {
97+ _notifications = true ;
9498 }
9599
96100 if ( Event . TaskPluginArguments . ContainsKey ( Keys . ReviewedExecutionId ) )
Original file line number Diff line number Diff line change @@ -40,12 +40,12 @@ public void AssertClinicalReviewEvent(ClinicalReviewRequestEvent clinicalReviewR
4040 clinicalReviewRequestEvent . PatientMetadata . PatientName . Should ( ) . Be ( GetTaskPluginArguments ( taskDispatchEvent , "patient_name" ) ) ;
4141 clinicalReviewRequestEvent . PatientMetadata . PatientSex . Should ( ) . Be ( GetTaskPluginArguments ( taskDispatchEvent , "patient_sex" ) ) ;
4242 clinicalReviewRequestEvent . PatientMetadata . PatientDob . Should ( ) . Be ( GetTaskPluginArguments ( taskDispatchEvent , "patient_dob" ) ) ;
43- try
44- {
45- var notifications = GetTaskPluginArguments ( taskDispatchEvent , "notifications" ) ;
4643
44+ if ( Boolean . TryParse ( GetTaskPluginArguments ( taskDispatchEvent , "notifications" ) , out bool result ) )
45+ {
46+ clinicalReviewRequestEvent . Notifications . Should ( ) . Be ( result ) ;
4747 }
48- catch ( Exception ex )
48+ else
4949 {
5050 clinicalReviewRequestEvent . Notifications . Should ( ) . Be ( true ) ;
5151 }
You can’t perform that action at this time.
0 commit comments