@@ -108,18 +108,18 @@ public async Task<AndWhichConstraint<ReactiveAssertions<TPayload>, IEnumerable<T
108108 }
109109
110110 /// <summary>
111- /// Asserts that at least <paramref name="numberOfNotifications"/> notifications are pushed to the <see cref="FluentTestObserver{TPayload}"/> within the next 1 second .<br />
111+ /// Asserts that at least <paramref name="numberOfNotifications"/> notifications are pushed to the <see cref="FluentTestObserver{TPayload}"/> within the next 1 seconds .<br />
112112 /// This includes any previously recorded notifications since it has been created or cleared.
113113 /// </summary>
114114 /// <param name="numberOfNotifications">the number of notifications the observer should have recorded by now</param>
115115 /// <param name="because"></param>
116116 /// <param name="becauseArgs"></param>
117117 public AndWhichConstraint < ReactiveAssertions < TPayload > , IEnumerable < TPayload > > Push ( int numberOfNotifications , string because = "" , params object [ ] becauseArgs )
118- => Push ( numberOfNotifications , TimeSpan . FromSeconds ( 10 ) , because , becauseArgs ) ;
118+ => Push ( numberOfNotifications , TimeSpan . FromSeconds ( 1 ) , because , becauseArgs ) ;
119119
120120 /// <inheritdoc cref="Push(int,string,object[])"/>
121121 public Task < AndWhichConstraint < ReactiveAssertions < TPayload > , IEnumerable < TPayload > > > PushAsync ( int numberOfNotifications , string because = "" , params object [ ] becauseArgs )
122- => PushAsync ( numberOfNotifications , TimeSpan . FromSeconds ( 10 ) , because , becauseArgs ) ;
122+ => PushAsync ( numberOfNotifications , TimeSpan . FromSeconds ( 1 ) , because , becauseArgs ) ;
123123
124124 /// <summary>
125125 /// Asserts that at least 1 notification is pushed to the <see cref="FluentTestObserver{TPayload}"/> within the next 1 second.<br />
@@ -266,7 +266,11 @@ public AndConstraint<ReactiveAssertions<TPayload>> NotComplete(string because =
266266 /// Zero or more objects to format using the placeholders in <paramref name="because"/>.
267267 /// </param>
268268 /// <exception cref="ArgumentNullException"><paramref name="predicate"/> is <c>null</c>.</exception>
269- public AndConstraint < ReactiveAssertions < TPayload > > PushMatch ( [ NotNull ] Expression < Func < TPayload , bool > > predicate , TimeSpan timeout , string because = "" , params object [ ] becauseArgs )
269+ public AndConstraint < ReactiveAssertions < TPayload > > PushMatch (
270+ [ NotNull ] Expression < Func < TPayload , bool > > predicate ,
271+ TimeSpan timeout ,
272+ string because = "" ,
273+ params object [ ] becauseArgs )
270274 {
271275 if ( predicate == null ) throw new ArgumentNullException ( nameof ( predicate ) ) ;
272276
@@ -303,9 +307,33 @@ public AndConstraint<ReactiveAssertions<TPayload>> PushMatch([NotNull] Expressio
303307 return new AndConstraint < ReactiveAssertions < TPayload > > ( this ) ;
304308 }
305309
306- /// <inheritdoc cref="PushMatch"/>
307- public async Task < AndConstraint < ReactiveAssertions < TPayload > > > PushMatchAsync ( [ NotNull ] Expression < Func < TPayload , bool > > predicate , TimeSpan timeout ,
308- string because = "" , params object [ ] becauseArgs )
310+ /// <summary>
311+ /// Asserts that at least one notification matching <paramref name="predicate"/> was pushed to the <see cref="FluentTestObserver{TPayload}"/>
312+ /// within the next 1 second.<br />
313+ /// This includes any previously recorded notifications since it has been created or cleared.
314+ /// </summary>
315+ /// <param name="predicate">A predicate to match the items in the collection against.</param>
316+ /// <param name="timeout">the maximum time to wait for the notification to arrive</param>
317+ /// <param name="because">
318+ /// A formatted phrase as is supported by <see cref="string.Format(string,object[])" /> explaining why the assertion
319+ /// is needed. If the phrase does not start with the word <i>because</i>, it is prepended automatically.
320+ /// </param>
321+ /// <param name="becauseArgs">
322+ /// Zero or more objects to format using the placeholders in <paramref name="because"/>.
323+ /// </param>
324+ /// <exception cref="ArgumentNullException"><paramref name="predicate"/> is <c>null</c>.</exception>
325+ public AndConstraint < ReactiveAssertions < TPayload > > PushMatch (
326+ [ NotNull ] Expression < Func < TPayload , bool > > predicate ,
327+ string because = "" ,
328+ params object [ ] becauseArgs )
329+ => PushMatch ( predicate , TimeSpan . FromSeconds ( 1 ) , because , becauseArgs ) ;
330+
331+ /// <inheritdoc cref="PushMatch(Expression{Func{TPayload, bool}},TimeSpan,string,object[])"/>
332+ public async Task < AndConstraint < ReactiveAssertions < TPayload > > > PushMatchAsync (
333+ [ NotNull ] Expression < Func < TPayload , bool > > predicate ,
334+ TimeSpan timeout ,
335+ string because = "" ,
336+ params object [ ] becauseArgs )
309337 {
310338 if ( predicate == null )
311339 throw new ArgumentNullException ( nameof ( predicate ) ) ;
@@ -342,6 +370,13 @@ public async Task<AndConstraint<ReactiveAssertions<TPayload>>> PushMatchAsync([N
342370 return new AndWhichConstraint < ReactiveAssertions < TPayload > , IEnumerable < TPayload > > ( this , notifications ) ;
343371 }
344372
373+ /// <inheritdoc cref="PushMatch(Expression{Func{TPayload, bool}},string,object[])"/>
374+ public Task < AndConstraint < ReactiveAssertions < TPayload > > > PushMatchAsync (
375+ [ NotNull ] Expression < Func < TPayload , bool > > predicate ,
376+ string because = "" ,
377+ params object [ ] becauseArgs )
378+ => PushMatchAsync ( predicate , TimeSpan . FromSeconds ( 1 ) , because , becauseArgs ) ;
379+
345380 protected Task < IList < Recorded < Notification < TPayload > > > > GetRecordedNotifications ( TimeSpan timeout ) =>
346381 Observer . RecordedNotificationStream
347382 . TakeUntil ( recorded => recorded . Value . Kind == NotificationKind . OnError )
0 commit comments