public void GetValue () { ConcreteDependencyObject cdo = new ConcreteDependencyObject (); Assert.Throws<Exception> (delegate { cdo.GetValue (InputMethod.IsInputMethodEnabledProperty); }, "GetValue"); TextBox tb = new TextBox (); Assert.IsTrue ((bool) tb.GetValue (InputMethod.IsInputMethodEnabledProperty), "TextBox"); MyTextBox mtb = new MyTextBox (); Assert.IsTrue ((bool) mtb.GetValue (InputMethod.IsInputMethodEnabledProperty), "MyTextBox"); }
public void GetValue() { ConcreteDependencyObject cdo = new ConcreteDependencyObject(); Assert.Throws <Exception> (delegate { cdo.GetValue(InputMethod.IsInputMethodEnabledProperty); }, "GetValue"); TextBox tb = new TextBox(); Assert.IsTrue((bool)tb.GetValue(InputMethod.IsInputMethodEnabledProperty), "TextBox"); MyTextBox mtb = new MyTextBox(); Assert.IsTrue((bool)mtb.GetValue(InputMethod.IsInputMethodEnabledProperty), "MyTextBox"); }