@@ -83,6 +83,40 @@ public void TestBasicFlow()
83
83
waitForCompletion ( ) ;
84
84
}
85
85
86
+ [ Test ]
87
+ public void TestNormalDoesForwardToOverlay ( )
88
+ {
89
+ SimpleNotification notification = null ! ;
90
+
91
+ AddStep ( @"simple #1" , ( ) => notificationOverlay . Post ( notification = new SimpleNotification
92
+ {
93
+ Text = @"This shouldn't annoy you too much" ,
94
+ Transient = false ,
95
+ } ) ) ;
96
+
97
+ AddAssert ( "notification in toast tray" , ( ) => notification . IsInToastTray , ( ) => Is . True ) ;
98
+ AddUntilStep ( "wait for dismissed" , ( ) => notification . IsInToastTray , ( ) => Is . False ) ;
99
+
100
+ checkDisplayedCount ( 1 ) ;
101
+ }
102
+
103
+ [ Test ]
104
+ public void TestTransientDoesNotForwardToOverlay ( )
105
+ {
106
+ SimpleNotification notification = null ! ;
107
+
108
+ AddStep ( @"simple #1" , ( ) => notificationOverlay . Post ( notification = new SimpleNotification
109
+ {
110
+ Text = @"This shouldn't annoy you too much" ,
111
+ Transient = true ,
112
+ } ) ) ;
113
+
114
+ AddAssert ( "notification in toast tray" , ( ) => notification . IsInToastTray , ( ) => Is . True ) ;
115
+ AddUntilStep ( "wait for dismissed" , ( ) => notification . IsInToastTray , ( ) => Is . False ) ;
116
+
117
+ checkDisplayedCount ( 0 ) ;
118
+ }
119
+
86
120
[ Test ]
87
121
public void TestForwardWithFlingRight ( )
88
122
{
@@ -634,12 +668,18 @@ private void sendManyNotifications()
634
668
635
669
private partial class BackgroundNotification : SimpleNotification
636
670
{
637
- public override bool IsImportant => false ;
671
+ public BackgroundNotification ( )
672
+ {
673
+ IsImportant = false ;
674
+ }
638
675
}
639
676
640
677
private partial class BackgroundProgressNotification : ProgressNotification
641
678
{
642
- public override bool IsImportant => false ;
679
+ public BackgroundProgressNotification ( )
680
+ {
681
+ IsImportant = false ;
682
+ }
643
683
}
644
684
}
645
685
}
0 commit comments