Permalink
Browse files

Test WhenAny with a DependencyObject

  • Loading branch information...
1 parent 2721063 commit dc236ebb025b4452bf9a689826e18d2c163d9f24 @paulcbetts paulcbetts committed Aug 13, 2012
Showing with 15 additions and 1 deletion.
  1. +15 −1 ReactiveUI.Tests/DependencyObjectObservableForPropertyTest.cs
@@ -40,5 +40,19 @@ public void DependencyObjectObservableForPropertySmokeTest()
disp1.Dispose();
disp2.Dispose();
}
+
+ [Fact]
+ public void WhenAnyWithDependencyObjectTest()
+ {
+ var inputs = new[] {"Foo", "Bar", "Baz"};
+ var fixture = new DepObjFixture();
+
+ var outputs = fixture.WhenAny(x => x.TestString, x => x.Value).CreateCollection();
+ inputs.ForEach(x => fixture.TestString = x);
+
+ Assert.Null(outputs.First());
+ Assert.Equal(4, outputs.Count);
+ Assert.True(inputs.Zip(outputs.Skip(1), (expected, actual) => expected == actual).All(x => x));
+ }
}
-}
+}

0 comments on commit dc236eb

Please sign in to comment.