public void GetPropertyInfo_Result_Int() { PropertyInfo info = InfoHelper.GetPropertyInfo(() => InfoHelperClass.StaticIntProperty); Assert.IsNotNull(info); Assert.AreEqual(info.Name, "StaticIntProperty"); }
public void GetPropertyInfo_Instance_Int() { PropertyInfo info = InfoHelper.GetPropertyInfo <InfoHelperClass>(i => i.IntProperty); Assert.IsNotNull(info); Assert.AreEqual(info.Name, "IntProperty"); }
public void GetPropertyInfo_Result_InvalidThrowIfNotFoundThrows() { PropertyInfo info = InfoHelper.GetPropertyInfo(() => InfoHelperClass.StaticIntField, true); Assert.Fail("Didn't throw"); }
public void GetPropertyInfo_Result_Invalid() { PropertyInfo info = InfoHelper.GetPropertyInfo(() => InfoHelperClass.StaticIntField); Assert.IsNull(info); }
public void GetPropertyInfo_Instance_InvalidThrowIfNotFoundThrows() { PropertyInfo info = InfoHelper.GetPropertyInfo <InfoHelperClass>(i => i.IntField, true); Assert.Fail("Didn't throw"); }
public void GetPropertyInfo_Instance_Invalid() { PropertyInfo info = InfoHelper.GetPropertyInfo <InfoHelperClass>(i => i.IntField); Assert.IsNull(info); }