|
@@ -8,6 +8,7 @@ using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Linq;
|
|
using System.Reactive.Concurrency;
|
|
using System.Reactive.Concurrency;
|
|
using System.Reactive.Disposables;
|
|
using System.Reactive.Disposables;
|
|
|
|
+using System.Reactive.Disposables.Fluent;
|
|
using System.Threading;
|
|
using System.Threading;
|
|
using Microsoft.Reactive.Testing;
|
|
using Microsoft.Reactive.Testing;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
@@ -415,6 +416,19 @@ namespace ReactiveTests.Tests
|
|
Assert.False(composite.GetEnumerator().MoveNext());
|
|
Assert.False(composite.GetEnumerator().MoveNext());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ [TestMethod]
|
|
|
|
+ public void CompositeDisposable_DisposeWith()
|
|
|
|
+ {
|
|
|
|
+ var c = new CompositeDisposable();
|
|
|
|
+ var d = new BooleanDisposable();
|
|
|
|
+ d.DisposeWith(c);
|
|
|
|
+ Assert.True(c.Contains(d));
|
|
|
|
+
|
|
|
|
+ c.Dispose();
|
|
|
|
+ Assert.True(d.IsDisposed);
|
|
|
|
+ Assert.True(c.IsDisposed);
|
|
|
|
+ }
|
|
|
|
+
|
|
[TestMethod]
|
|
[TestMethod]
|
|
public void CompositeDisposable_NonCollection_Enumerable_Init()
|
|
public void CompositeDisposable_NonCollection_Enumerable_Init()
|
|
{
|
|
{
|