예제 #1
0
    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"));

    }
예제 #2
0
    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"));

    }
예제 #3
0
    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"));

    }