public void When_TypeMismatch() { var SUT = new Binding_TypeMismatch(); SUT.ForceLoaded(); var slider = SUT.FindName("mySlider") as Slider; var textBlock = SUT.FindName("myTextBlock") as TextBlock; Assert.AreEqual(0.0, slider.Value); Assert.AreEqual("0", textBlock.Text); Assert.AreEqual(0, SUT.MyInteger); slider.Minimum = 10.0; Assert.AreEqual(10.0, slider.Value); Assert.AreEqual(10, SUT.MyInteger); Assert.AreEqual("10", textBlock.Text); }
public void When_TypeMismatch() { var SUT = new Binding_TypeMismatch(); SUT.ForceLoaded(); var inner = SUT.FindName("mySlider") as Slider; Assert.AreEqual(0.0, inner.Value); Assert.AreEqual(0, SUT.MyInteger); inner.Minimum = 10.0; Assert.AreEqual(10.0, inner.Value); Assert.AreEqual(10, SUT.MyInteger); }