@@ -248,6 +248,93 @@ public void ConfigurationChangedEvent_Properties_ArePreserved()
248248 Assert . Equal ( "Dark" , e . NewValue ) ;
249249 }
250250
251+ [ Fact ]
252+ public void AppQuitEvent_ExtendsEventBase_HasTimestamp ( )
253+ {
254+ DateTime before = DateTime . UtcNow ;
255+ var e = new AppQuitEvent ( ) ;
256+ DateTime after = DateTime . UtcNow ;
257+
258+ Assert . InRange ( e . Timestamp , before , after ) ;
259+ }
260+
261+ [ Fact ]
262+ public void AppQuitEvent_CanBePublishedAndReceived ( )
263+ {
264+ var bus = new EventBus ( ) ;
265+ AppQuitEvent received = null ;
266+
267+ bus . Subscribe < AppQuitEvent > ( e => received = e ) ;
268+ bus . Publish ( new AppQuitEvent ( ) ) ;
269+
270+ Assert . NotNull ( received ) ;
271+ }
272+
273+ [ Fact ]
274+ public void CalibrationEndEvent_ExtendsEventBase_HasTimestamp ( )
275+ {
276+ DateTime before = DateTime . UtcNow ;
277+ var e = new CalibrationEndEvent ( ) ;
278+ DateTime after = DateTime . UtcNow ;
279+
280+ Assert . InRange ( e . Timestamp , before , after ) ;
281+ }
282+
283+ [ Fact ]
284+ public void CalibrationEndEvent_CanBePublishedAndReceived ( )
285+ {
286+ var bus = new EventBus ( ) ;
287+ CalibrationEndEvent received = null ;
288+
289+ bus . Subscribe < CalibrationEndEvent > ( e => received = e ) ;
290+ bus . Publish ( new CalibrationEndEvent ( ) ) ;
291+
292+ Assert . NotNull ( received ) ;
293+ }
294+
295+ [ Fact ]
296+ public void DisplaySettingsChangedEvent_ExtendsEventBase_HasTimestamp ( )
297+ {
298+ DateTime before = DateTime . UtcNow ;
299+ var e = new DisplaySettingsChangedEvent ( ) ;
300+ DateTime after = DateTime . UtcNow ;
301+
302+ Assert . InRange ( e . Timestamp , before , after ) ;
303+ }
304+
305+ [ Fact ]
306+ public void DisplaySettingsChangedEvent_CanBePublishedAndReceived ( )
307+ {
308+ var bus = new EventBus ( ) ;
309+ DisplaySettingsChangedEvent received = null ;
310+
311+ bus . Subscribe < DisplaySettingsChangedEvent > ( e => received = e ) ;
312+ bus . Publish ( new DisplaySettingsChangedEvent ( ) ) ;
313+
314+ Assert . NotNull ( received ) ;
315+ }
316+
317+ [ Fact ]
318+ public void WordPredictionContextChangedEvent_Context_IsPreserved ( )
319+ {
320+ var ctx = new object ( ) ;
321+ var e = new WordPredictionContextChangedEvent ( ctx ) ;
322+
323+ Assert . Same ( ctx , e . Context ) ;
324+ }
325+
326+ [ Fact ]
327+ public void WordPredictionContextChangedEvent_CanBePublishedAndReceived ( )
328+ {
329+ var bus = new EventBus ( ) ;
330+ WordPredictionContextChangedEvent received = null ;
331+
332+ bus . Subscribe < WordPredictionContextChangedEvent > ( e => received = e ) ;
333+ bus . Publish ( new WordPredictionContextChangedEvent ( null ) ) ;
334+
335+ Assert . NotNull ( received ) ;
336+ }
337+
251338 // ----------------------------------------------------------------
252339 // Helpers
253340 // ----------------------------------------------------------------
0 commit comments