public void GetFieldInfo_Result_Int() { FieldInfo info = InfoHelper.GetFieldInfo(() => InfoHelperClass.StaticIntField); Assert.IsNotNull(info); Assert.AreEqual(info.Name, "StaticIntField"); }
public void GetFieldInfo_Instance_Int() { FieldInfo info = InfoHelper.GetFieldInfo <InfoHelperClass>(i => i.IntField); Assert.IsNotNull(info); Assert.AreEqual(info.Name, "IntField"); }
public void GetFieldInfo_Result_InvalidThrowIfNotFoundThrows() { FieldInfo info = InfoHelper.GetFieldInfo(() => InfoHelperClass.StaticIntProperty, true); Assert.Fail("Didn't throw"); }
public void GetFieldInfo_Result_Invalid() { FieldInfo info = InfoHelper.GetFieldInfo(() => InfoHelperClass.StaticIntProperty); Assert.IsNull(info); }
public void GetFieldInfo_Instance_InvalidThrowIfNotFoundThrows() { FieldInfo info = InfoHelper.GetFieldInfo <InfoHelperClass>(i => i.IntProperty, true); Assert.Fail("Didn't throw"); }
public void GetFieldInfo_Instance_Invalid() { FieldInfo info = InfoHelper.GetFieldInfo <InfoHelperClass>(i => i.IntProperty); Assert.IsNull(info); }