Пример #1
0
        public void CodeGen_Key_Type_Not_Supported()
        {
            string error = string.Format(Resource.EntityCodeGen_EntityKey_PropertyNotSerializable, typeof(Mock_CG_Key_Type_Not_Serializable), "KeyField");

            TestHelper.GenerateCodeAssertFailure("C#", typeof(Mock_CG_Key_Type_Not_Serializable), error);

            error = string.Format(Resource.EntityCodeGen_EntityKey_KeyTypeNotSupported, typeof(Mock_CG_Key_Type_Complex), "KeyField", typeof(List <string>));
            TestHelper.GenerateCodeAssertFailure("C#", typeof(Mock_CG_Key_Type_Complex), error);
        }
Пример #2
0
 internal static void GenerateCodeAssertFailure(string language, Type entityType, params string[] errors)
 {
     TestHelper.GenerateCodeAssertFailure(language, new Type[] { entityType }, errors);
 }
Пример #3
0
        public void CodeGen_Namespace_Fails_Missing()
        {
            string error = string.Format(CultureInfo.CurrentCulture, Resource.ClientCodeGen_Namespace_Required, "Mock_CG_Attr_Entity_Missing_Namespace");

            TestHelper.GenerateCodeAssertFailure("C#", typeof(Mock_CG_Attr_Entity_Missing_Namespace), error);
        }
Пример #4
0
        public void CodeGen_EntityWithStructProperty()
        {
            string error = string.Format(SimpleEntity.Server.Resource.Invalid_Entity_Property, typeof(Mock_CG_Entity_WithStructProperty).FullName, "StructProperty");

            TestHelper.GenerateCodeAssertFailure("C#", typeof(Mock_CG_Entity_WithStructProperty), error);
        }