public void FromProperty () { var pi = str_len; var i = new XamlMemberInvoker (new XamlMember (pi, sctx)); Assert.AreEqual (pi.GetGetMethod (), i.UnderlyingGetter, "#1"); Assert.IsNull (i.UnderlyingSetter, "#2"); Assert.AreEqual (5, i.GetValue ("hello"), "#3"); }
public void GetValueOnWriteOnlyProperty () { var pi = xr_resolver; var i = new XamlMemberInvoker (new XamlMember (pi, sctx)); i.GetValue (new XmlUrlResolver ()); }
public void GetValueNullObject () { var pi = str_len; var i = new XamlMemberInvoker (new XamlMember (pi, sctx)); i.GetValue (null); }
public void GetValueOnEvent () { var ei = ass_load; var i = new XamlMemberInvoker (new XamlMember (ei, sctx)); i.GetValue (AppDomain.CurrentDomain); }
public void GetValueOnTypeValue () { var xm = XamlLanguage.Type.GetMember ("Type"); var i = new XamlMemberInvoker (xm); var o = i.GetValue (new TypeExtension (typeof (int))); Assert.AreEqual (typeof (int), o, "#1"); }
public void GetValueOnIrrelevantObject () { var pi = str_len; var i = new XamlMemberInvoker (new XamlMember (pi, sctx)); i.GetValue (new StringBuilder ()); }