|
@@ -79,6 +79,8 @@ namespace Microsoft.Reactive.Testing
|
|
|
/// <param name="disposed">Virtual time at which to dispose the subscription.</param>
|
|
/// <param name="disposed">Virtual time at which to dispose the subscription.</param>
|
|
|
/// <returns>Observer with timestamped recordings of notification messages that were received during the virtual time window when the subscription to the source sequence was active.</returns>
|
|
/// <returns>Observer with timestamped recordings of notification messages that were received during the virtual time window when the subscription to the source sequence was active.</returns>
|
|
|
/// <exception cref="ArgumentNullException"><paramref name="create"/> is null.</exception>
|
|
/// <exception cref="ArgumentNullException"><paramref name="create"/> is null.</exception>
|
|
|
|
|
+ /// <exception cref="ArgumentOutOfRangeException"><paramref name="subscribed"/> is less than <paramref name="created"/>.</exception>
|
|
|
|
|
+ /// <exception cref="ArgumentOutOfRangeException"><paramref name="disposed"/> is less than <paramref name="created"/> or <paramref name="subscribed"/>.</exception>
|
|
|
public ITestableObserver<T> Start<T>(Func<IObservable<T>> create, long created, long subscribed, long disposed)
|
|
public ITestableObserver<T> Start<T>(Func<IObservable<T>> create, long created, long subscribed, long disposed)
|
|
|
{
|
|
{
|
|
|
if (create == null)
|
|
if (create == null)
|
|
@@ -86,6 +88,15 @@ namespace Microsoft.Reactive.Testing
|
|
|
throw new ArgumentNullException(nameof(create));
|
|
throw new ArgumentNullException(nameof(create));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if (subscribed < created)
|
|
|
|
|
+ {
|
|
|
|
|
+ throw new ArgumentOutOfRangeException(nameof(subscribed));
|
|
|
|
|
+ }
|
|
|
|
|
+ if (disposed < created || disposed < subscribed)
|
|
|
|
|
+ {
|
|
|
|
|
+ throw new ArgumentOutOfRangeException(nameof(disposed));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
var source = default(IObservable<T>);
|
|
var source = default(IObservable<T>);
|
|
|
var subscription = default(IDisposable);
|
|
var subscription = default(IDisposable);
|
|
|
var observer = CreateObserver<T>();
|
|
var observer = CreateObserver<T>();
|
|
@@ -108,6 +119,7 @@ namespace Microsoft.Reactive.Testing
|
|
|
/// <param name="disposed">Virtual time at which to dispose the subscription.</param>
|
|
/// <param name="disposed">Virtual time at which to dispose the subscription.</param>
|
|
|
/// <returns>Observer with timestamped recordings of notification messages that were received during the virtual time window when the subscription to the source sequence was active.</returns>
|
|
/// <returns>Observer with timestamped recordings of notification messages that were received during the virtual time window when the subscription to the source sequence was active.</returns>
|
|
|
/// <exception cref="ArgumentNullException"><paramref name="create"/> is null.</exception>
|
|
/// <exception cref="ArgumentNullException"><paramref name="create"/> is null.</exception>
|
|
|
|
|
+ /// <exception cref="ArgumentOutOfRangeException"><paramref name="disposed"/> is less than <see cref="ReactiveTest.Subscribed"/>.</exception>
|
|
|
public ITestableObserver<T> Start<T>(Func<IObservable<T>> create, long disposed)
|
|
public ITestableObserver<T> Start<T>(Func<IObservable<T>> create, long disposed)
|
|
|
{
|
|
{
|
|
|
if (create == null)
|
|
if (create == null)
|