public void GetModelProperties_ModelHasIdAndNameProperty_NamePropertyIsNotMarkedAsPrimaryKey()
        {
            CreateViewTemplatePreprocessor();
            mvcHost.ViewDataType = typeof(ModelWithIdProperty);

            CSHtml.List.ModelProperty modelProperty = GetModelProperty("Name");

            Assert.IsFalse(modelProperty.IsPrimaryKey);
        }
        public void GetModelProperties_ModelHasPrefixedIdPropertyInLowerCase_PrefixedIdPropertyIsMarkedAsPrimaryKey()
        {
            CreateViewTemplatePreprocessor();
            mvcHost.ViewDataType = typeof(ModelWithPrefixedIdPropertyInLowerCase);

            CSHtml.List.ModelProperty modelProperty = GetModelProperty("modelwithprefixedidpropertyinlowercaseid");

            Assert.IsTrue(modelProperty.IsPrimaryKey);
        }
        public void GetModelProperties_ModelHasOnePropertyCalledName_ReturnsModelPropertyCalledName()
        {
            CreateViewTemplatePreprocessor();
            mvcHost.ViewDataType = typeof(ModelWithOneProperty);

            CSHtml.List.ModelProperty modelProperty = GetFirstModelProperty();

            Assert.AreEqual("Name", modelProperty.Name);
        }