@@ -65,7 +65,7 @@ public void Agent_DeviceAdded_NullInternalErrorSwallowsFault()
6565 var device = new Device { Name = "device-1" , Uuid = "uuid-1" } ;
6666 EventHandler < IDevice > handler = ( _ , _ ) => throw new InvalidOperationException ( "DeviceAdded fault" ) ;
6767
68- Assert . DoesNotThrow ( ( ) => handler . Raise ( this , ( IDevice ) device , null ) ) ;
68+ Assert . DoesNotThrow ( ( Action ) ( ( ) => handler . Raise ( this , ( IDevice ) device , null ) ) ) ;
6969 }
7070
7171 // -----------------------------------------------------------------------
@@ -96,7 +96,7 @@ public void Agent_ObservationReceived_NullInternalErrorSwallowsFault()
9696 var obs = new ObservationInput ( ) ;
9797 EventHandler < IObservationInput > handler = ( _ , _ ) => throw new InvalidOperationException ( "ObservationReceived fault" ) ;
9898
99- Assert . DoesNotThrow ( ( ) => handler . Raise ( this , ( IObservationInput ) obs , null ) ) ;
99+ Assert . DoesNotThrow ( ( Action ) ( ( ) => handler . Raise ( this , ( IObservationInput ) obs , null ) ) ) ;
100100 }
101101
102102 // -----------------------------------------------------------------------
@@ -127,7 +127,7 @@ public void Agent_ObservationAdded_NullInternalErrorSwallowsFault()
127127 var obs = new Observation ( ) ;
128128 EventHandler < IObservation > handler = ( _ , _ ) => throw new InvalidOperationException ( "ObservationAdded fault" ) ;
129129
130- Assert . DoesNotThrow ( ( ) => handler . Raise ( this , ( IObservation ) obs , null ) ) ;
130+ Assert . DoesNotThrow ( ( Action ) ( ( ) => handler . Raise ( this , ( IObservation ) obs , null ) ) ) ;
131131 }
132132
133133 // -----------------------------------------------------------------------
@@ -158,7 +158,7 @@ public void Agent_AssetAdded_NullInternalErrorSwallowsFault()
158158 var asset = new Asset { AssetId = "a1" , Timestamp = DateTime . UtcNow } ;
159159 EventHandler < IAsset > handler = ( _ , _ ) => throw new InvalidOperationException ( "AssetAdded fault" ) ;
160160
161- Assert . DoesNotThrow ( ( ) => handler . Raise ( this , ( IAsset ) asset , null ) ) ;
161+ Assert . DoesNotThrow ( ( Action ) ( ( ) => handler . Raise ( this , ( IAsset ) asset , null ) ) ) ;
162162 }
163163
164164 // -----------------------------------------------------------------------
@@ -187,7 +187,7 @@ public void AgentBroker_StreamsResponseSent_NullInternalErrorSwallowsFault()
187187 {
188188 EventHandler handler = ( _ , _ ) => throw new InvalidOperationException ( "StreamsResponseSent fault" ) ;
189189
190- Assert . DoesNotThrow ( ( ) => handler . Raise ( this , EventArgs . Empty , null ) ) ;
190+ Assert . DoesNotThrow ( ( Action ) ( ( ) => handler . Raise ( this , EventArgs . Empty , null ) ) ) ;
191191 }
192192
193193 // -----------------------------------------------------------------------
@@ -201,7 +201,7 @@ public void Agent_NullGenericHandler_DoesNotThrow()
201201 EventHandler < IDevice > ? handler = null ;
202202 var device = new Device { Name = "noop-device" , Uuid = "noop-uuid" } ;
203203
204- Assert . DoesNotThrow ( ( ) => handler . Raise ( this , ( IDevice ) device , null ) ) ;
204+ Assert . DoesNotThrow ( ( Action ) ( ( ) => handler . Raise ( this , ( IDevice ) device , null ) ) ) ;
205205 }
206206
207207 /// <summary>Pins the behavior expressed by the test name: Raise with a null non-generic EventHandler is a safe no-op covering the no-subscriber case at runtime.</summary>
@@ -210,7 +210,7 @@ public void AgentBroker_NullNonGenericHandler_DoesNotThrow()
210210 {
211211 EventHandler ? handler = null ;
212212
213- Assert . DoesNotThrow ( ( ) => handler . Raise ( this , EventArgs . Empty , null ) ) ;
213+ Assert . DoesNotThrow ( ( Action ) ( ( ) => handler . Raise ( this , EventArgs . Empty , null ) ) ) ;
214214 }
215215
216216 // =======================================================================
@@ -246,7 +246,7 @@ public void Agent_InvalidDeviceAdded_NullInternalErrorSwallowsFault()
246246 var result = new ValidationResult ( false , "bad device" ) ;
247247 MTConnectDeviceValidationHandler handler = ( _ , _ ) => throw new InvalidOperationException ( "InvalidDeviceAdded fault" ) ;
248248
249- Assert . DoesNotThrow ( ( ) => MulticastIsolation . Raise ( handler , h => h ( device , result ) ) ) ;
249+ Assert . DoesNotThrow ( ( Action ) ( ( ) => MulticastIsolation . Raise ( handler , h => h ( device , result ) ) ) ) ;
250250 }
251251
252252 // -----------------------------------------------------------------------
@@ -278,7 +278,7 @@ public void Agent_InvalidComponentAdded_NullInternalErrorSwallowsFault()
278278 var result = new ValidationResult ( false , "bad component" ) ;
279279 MTConnectComponentValidationHandler handler = ( _ , _ , _ ) => throw new InvalidOperationException ( "InvalidComponentAdded fault" ) ;
280280
281- Assert . DoesNotThrow ( ( ) => MulticastIsolation . Raise ( handler , h => h ( "uuid-1" , component , result ) ) ) ;
281+ Assert . DoesNotThrow ( ( Action ) ( ( ) => MulticastIsolation . Raise ( handler , h => h ( "uuid-1" , component , result ) ) ) ) ;
282282 }
283283
284284 // -----------------------------------------------------------------------
@@ -310,7 +310,7 @@ public void Agent_InvalidCompositionAdded_NullInternalErrorSwallowsFault()
310310 var result = new ValidationResult ( false , "bad composition" ) ;
311311 MTConnectCompositionValidationHandler handler = ( _ , _ , _ ) => throw new InvalidOperationException ( "InvalidCompositionAdded fault" ) ;
312312
313- Assert . DoesNotThrow ( ( ) => MulticastIsolation . Raise ( handler , h => h ( "uuid-1" , composition , result ) ) ) ;
313+ Assert . DoesNotThrow ( ( Action ) ( ( ) => MulticastIsolation . Raise ( handler , h => h ( "uuid-1" , composition , result ) ) ) ) ;
314314 }
315315
316316 // -----------------------------------------------------------------------
@@ -342,7 +342,7 @@ public void Agent_InvalidDataItemAdded_NullInternalErrorSwallowsFault()
342342 var result = new ValidationResult ( false , "bad data item" ) ;
343343 MTConnectDataItemValidationHandler handler = ( _ , _ , _ ) => throw new InvalidOperationException ( "InvalidDataItemAdded fault" ) ;
344344
345- Assert . DoesNotThrow ( ( ) => MulticastIsolation . Raise ( handler , h => h ( "uuid-1" , dataItem , result ) ) ) ;
345+ Assert . DoesNotThrow ( ( Action ) ( ( ) => MulticastIsolation . Raise ( handler , h => h ( "uuid-1" , dataItem , result ) ) ) ) ;
346346 }
347347
348348 // -----------------------------------------------------------------------
@@ -372,7 +372,7 @@ public void Agent_InvalidObservationAdded_NullInternalErrorSwallowsFault()
372372 var result = new ValidationResult ( false , "bad observation" ) ;
373373 MTConnectObservationValidationHandler handler = ( _ , _ , _ ) => throw new InvalidOperationException ( "InvalidObservationAdded fault" ) ;
374374
375- Assert . DoesNotThrow ( ( ) => MulticastIsolation . Raise ( handler , h => h ( "uuid-1" , "key-1" , result ) ) ) ;
375+ Assert . DoesNotThrow ( ( Action ) ( ( ) => MulticastIsolation . Raise ( handler , h => h ( "uuid-1" , "key-1" , result ) ) ) ) ;
376376 }
377377
378378 // -----------------------------------------------------------------------
@@ -404,7 +404,7 @@ public void Agent_InvalidAssetAdded_NullInternalErrorSwallowsFault()
404404 var result = new ValidationResult ( false , "bad asset" ) ;
405405 MTConnectAssetValidationHandler handler = ( _ , _ ) => throw new InvalidOperationException ( "InvalidAssetAdded fault" ) ;
406406
407- Assert . DoesNotThrow ( ( ) => MulticastIsolation . Raise ( handler , h => h ( asset , result ) ) ) ;
407+ Assert . DoesNotThrow ( ( Action ) ( ( ) => MulticastIsolation . Raise ( handler , h => h ( asset , result ) ) ) ) ;
408408 }
409409
410410 // =======================================================================
@@ -435,7 +435,7 @@ public void AgentBroker_DevicesRequestReceived_NullInternalErrorSwallowsFault()
435435 {
436436 MTConnectDevicesRequestedHandler handler = _ => throw new InvalidOperationException ( "DevicesRequestReceived fault" ) ;
437437
438- Assert . DoesNotThrow ( ( ) => MulticastIsolation . Raise ( handler , h => h ( "uuid-1" ) ) ) ;
438+ Assert . DoesNotThrow ( ( Action ) ( ( ) => MulticastIsolation . Raise ( handler , h => h ( "uuid-1" ) ) ) ) ;
439439 }
440440
441441 // -----------------------------------------------------------------------
@@ -462,7 +462,7 @@ public void AgentBroker_DevicesResponseSent_NullInternalErrorSwallowsFault()
462462 {
463463 MTConnectDevicesHandler handler = _ => throw new InvalidOperationException ( "DevicesResponseSent fault" ) ;
464464
465- Assert . DoesNotThrow ( ( ) => MulticastIsolation . Raise ( handler , h => h ( null ! ) ) ) ;
465+ Assert . DoesNotThrow ( ( Action ) ( ( ) => MulticastIsolation . Raise ( handler , h => h ( null ! ) ) ) ) ;
466466 }
467467
468468 // -----------------------------------------------------------------------
@@ -489,7 +489,7 @@ public void AgentBroker_StreamsRequestReceived_NullInternalErrorSwallowsFault()
489489 {
490490 MTConnectStreamsRequestedHandler handler = _ => throw new InvalidOperationException ( "StreamsRequestReceived fault" ) ;
491491
492- Assert . DoesNotThrow ( ( ) => MulticastIsolation . Raise ( handler , h => h ( "uuid-1" ) ) ) ;
492+ Assert . DoesNotThrow ( ( Action ) ( ( ) => MulticastIsolation . Raise ( handler , h => h ( "uuid-1" ) ) ) ) ;
493493 }
494494
495495 // -----------------------------------------------------------------------
@@ -518,7 +518,7 @@ public void AgentBroker_AssetsRequestReceived_NullInternalErrorSwallowsFault()
518518 var ids = new [ ] { "asset-1" } ;
519519 MTConnectAssetsRequestedHandler handler = _ => throw new InvalidOperationException ( "AssetsRequestReceived fault" ) ;
520520
521- Assert . DoesNotThrow ( ( ) => MulticastIsolation . Raise ( handler , h => h ( ids ) ) ) ;
521+ Assert . DoesNotThrow ( ( Action ) ( ( ) => MulticastIsolation . Raise ( handler , h => h ( ids ) ) ) ) ;
522522 }
523523
524524 // -----------------------------------------------------------------------
@@ -545,7 +545,7 @@ public void AgentBroker_DeviceAssetsRequestReceived_NullInternalErrorSwallowsFau
545545 {
546546 MTConnectDeviceAssetsRequestedHandler handler = _ => throw new InvalidOperationException ( "DeviceAssetsRequestReceived fault" ) ;
547547
548- Assert . DoesNotThrow ( ( ) => MulticastIsolation . Raise ( handler , h => h ( "uuid-1" ) ) ) ;
548+ Assert . DoesNotThrow ( ( Action ) ( ( ) => MulticastIsolation . Raise ( handler , h => h ( "uuid-1" ) ) ) ) ;
549549 }
550550
551551 // -----------------------------------------------------------------------
@@ -572,7 +572,7 @@ public void AgentBroker_AssetsResponseSent_NullInternalErrorSwallowsFault()
572572 {
573573 MTConnectAssetsHandler handler = _ => throw new InvalidOperationException ( "AssetsResponseSent fault" ) ;
574574
575- Assert . DoesNotThrow ( ( ) => MulticastIsolation . Raise ( handler , h => h ( null ! ) ) ) ;
575+ Assert . DoesNotThrow ( ( Action ) ( ( ) => MulticastIsolation . Raise ( handler , h => h ( null ! ) ) ) ) ;
576576 }
577577
578578 // -----------------------------------------------------------------------
@@ -599,7 +599,7 @@ public void AgentBroker_ErrorResponseSent_NullInternalErrorSwallowsFault()
599599 {
600600 MTConnectErrorHandler handler = _ => throw new InvalidOperationException ( "ErrorResponseSent fault" ) ;
601601
602- Assert . DoesNotThrow ( ( ) => MulticastIsolation . Raise ( handler , h => h ( ( IErrorResponseDocument ) null ! ) ) ) ;
602+ Assert . DoesNotThrow ( ( Action ) ( ( ) => MulticastIsolation . Raise ( handler , h => h ( ( IErrorResponseDocument ) null ! ) ) ) ) ;
603603 }
604604 }
605605}
0 commit comments