public void ShouldIgnoreASetMethod() { var member = MemberCache .GetSourceMembers(typeof(PublicSetMethod <short>)) .FirstOrDefault(m => m.Name == "Value"); member.ShouldBeNull(); }
public void ShouldIgnoreGetType() { var member = MemberCache .GetSourceMembers(typeof(PublicProperty <int?>)) .FirstOrDefault(m => m.Name == "GetType"); member.ShouldBeNull(); }
public void ShouldIgnoreAWriteOnlyPublicProperty() { var member = MemberCache .GetSourceMembers(typeof(PublicWriteOnlyProperty <long>)) .FirstOrDefault(m => m.Name == "Value"); member.ShouldBeNull(); }
public void ShouldIgnoreANonPublicField() { var member = MemberCache .GetSourceMembers(typeof(InternalField <byte>)) .FirstOrDefault(m => m.Name == "Value"); member.ShouldBeNull(); }
public void ShouldFindARootArrayElement() { var member = MemberCache .GetSourceMembers(typeof(int[])) .FirstOrDefault(); member.ShouldNotBeNull(); }
public void ShouldIgnoreAPropertyGetter() { var member = MemberCache .GetSourceMembers(typeof(PublicProperty <string>)) .FirstOrDefault(m => m.Name.StartsWith("get_")); member.ShouldBeNull(); }
public void ShouldFindAPublicGetMethod() { var member = MemberCache .GetSourceMembers(typeof(PublicGetMethod <DateTime>)) .FirstOrDefault(m => m.Name == "GetValue"); member.ShouldNotBeNull(); member.Type.ShouldBe(typeof(DateTime)); }
public void ShouldFindAPublicField() { var member = MemberCache .GetSourceMembers(typeof(PublicField <int>)) .FirstOrDefault(m => m.Name == "Value"); member.ShouldNotBeNull(); member.Type.ShouldBe(typeof(int)); }
public void ShouldFindAPublicProperty() { var member = MemberCache .GetSourceMembers(typeof(PublicProperty <string>)) .FirstOrDefault(m => m.Name == "Value"); member.ShouldNotBeNull(); member.Type.ShouldBe(typeof(string)); }