public void ShowFieldsIfNoPropertyAvailalbe() { var showInfo = MemberProvider.Create(new FieldsWithUnderLines()); var value = showInfo.Value; var names = value.GetNames(); Assert.IsTrue(names.Contains("_Field")); Assert.IsTrue(names.Contains("_OtherField")); }
public void MixBag() { var showInfo = MemberProvider.Create(new MixedBag()); var value = showInfo.Value; var names = value.GetNames(); Assert.IsTrue(names.Contains("_Field")); Assert.IsTrue(names.Contains("AutoProperty")); Assert.IsTrue(names.Contains("AProperty")); }
public void CanDealWithAnonymousTypes() { var showInfo = MemberProvider.Create(new { A = "Fun", B = "More Fun" }); Assert.IsFalse(showInfo.HasValue); }
public void EnumerablesAreNotVisualized() { var showInfo = MemberProvider.Create(new [] { new FieldsAndProperties() }); Assert.IsFalse(showInfo.HasValue); }
public void OnlyApplyToGeneratedTypes() { var showInfo = MemberProvider.Create(new ArgumentException("test")); Assert.IsFalse(showInfo.HasValue); }
public void ExceptionIsNotVisualized() { var showInfo = MemberProvider.Create(new ArgumentException("test")); Assert.IsFalse(showInfo.HasValue); }
public void OnlyShowProperties() { var showInfo = MemberProvider.Create(new FieldsAndProperties()); AssertInfo(showInfo.Value); }