Skip to content

Commit

Permalink
Test WhenAny with a DependencyObject
Browse files Browse the repository at this point in the history
  • Loading branch information
anaisbetts committed Aug 13, 2012
1 parent 2721063 commit dc236eb
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion ReactiveUI.Tests/DependencyObjectObservableForPropertyTest.cs
Expand Up @@ -40,5 +40,19 @@ public void DependencyObjectObservableForPropertySmokeTest()
disp1.Dispose(); disp1.Dispose();
disp2.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.