public void GetMember_MethodInfoByKey_ReturnsValue() { var types = new TypeMemberInfoCollection(); Assert.IsNotNull(types.GetMember<MethodInfo>(typeof(ContentTypeDescriptor), "GetWebPath")); Assert.IsNull(types.GetMember<MethodInfo>(typeof(ContentTypeDescriptor), "AttributeDescriptors")); }
public void GetMember_GenericTypeMismatch_ReturnsNull() { var types = new TypeMemberInfoCollection(); Assert.IsNull(types.GetMember<PropertyInfo>(typeof(ContentTypeDescriptor), "IsTypeOf")); Assert.IsNull(types.GetMember<MethodInfo>(typeof(ContentTypeDescriptor), "AttributeDescriptors")); }
public void GetMember_PropertyInfoByKey_ReturnsValue() { var types = new TypeMemberInfoCollection(); Assert.IsNotNull(types.GetMember<PropertyInfo>(typeof(ContentTypeDescriptor), "Key")); Assert.IsNotNull(types.GetMember<PropertyInfo>(typeof(ContentTypeDescriptor), "AttributeDescriptors")); Assert.IsNull(types.GetMember<PropertyInfo>(typeof(ContentTypeDescriptor), "InvalidPropertyName")); }