当前位置: 首页>>代码示例>>C#>>正文


C# EdmLibTestErrors类代码示例

本文整理汇总了C#中EdmLibTestErrors的典型用法代码示例。如果您正苦于以下问题:C# EdmLibTestErrors类的具体用法?C# EdmLibTestErrors怎么用?C# EdmLibTestErrors使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


EdmLibTestErrors类属于命名空间,在下文中一共展示了EdmLibTestErrors类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RoundTripValueAnnotationWithCollectionComplexTypeCsdl

        public void RoundTripValueAnnotationWithCollectionComplexTypeCsdl()
        {
            var expectedErrors = new EdmLibTestErrors();
            this.VerifySemanticValidation(VocabularyTestModelBuilder.ValueAnnotationWithCollectionComplexTypeCsdl(), EdmVersion.V40, expectedErrors);

            this.RoundTripValidator(VocabularyTestModelBuilder.ValueAnnotationWithCollectionComplexTypeCsdl(), EdmVersion.V40);
        }
开发者ID:larsenjo,项目名称:odata.net,代码行数:7,代码来源:VocabularyRoundTripTests.cs

示例2: NullCannotBeAssertedToBeANonNullableType

 public void NullCannotBeAssertedToBeANonNullableType()
 {
     var expectedErrors = new EdmLibTestErrors() 
     {
         {6, 8, EdmErrorCode.NullCannotBeAssertedToBeANonNullableType}
     };
     this.VerifySemanticValidation(ExpressionValidationTestModelBuilder.NullForNonNullableTerm(this.EdmVersion), expectedErrors);
 }
开发者ID:larsenjo,项目名称:odata.net,代码行数:8,代码来源:ExpressionSemanticValidationTest.cs

示例3: IncorrectPrimitiveTypeForTerm

 public void IncorrectPrimitiveTypeForTerm()
 {
     var expectedErrors = new EdmLibTestErrors() 
     {
         {5, 6, EdmErrorCode.ExpressionPrimitiveKindNotValidForAssertedType}
     };
     this.VerifySemanticValidation(ExpressionValidationTestModelBuilder.IncorrectPrimitiveTypeForTerm(this.EdmVersion), expectedErrors);
 }
开发者ID:larsenjo,项目名称:odata.net,代码行数:8,代码来源:ExpressionSemanticValidationTest.cs

示例4: ValidatePropertyRefAnnotationElementSupportInV40

 public void ValidatePropertyRefAnnotationElementSupportInV40()
 {
     var expectedErrors = new EdmLibTestErrors()
     {
         // [EdmLib] Key, ReturnType, Schema, Principle, Dependent, OnDelete do not support annotations. - won't fixed. 
     };
     this.VerifySemanticValidation(ValidationTestModelBuilder.PropertyRefAnnotationElementSupportInV40(this.EdmVersion), expectedErrors);
 }
开发者ID:larsenjo,项目名称:odata.net,代码行数:8,代码来源:AnnotationsOnNonRepresentedElementTests.cs

示例5: ValidateAnnotationElementFullNameShouldBeUnique

 public void ValidateAnnotationElementFullNameShouldBeUnique()
 {
     var expectedErrors = new EdmLibTestErrors()
     {
         { null, null, EdmErrorCode.DuplicateDirectValueAnnotationFullName}
     };
     this.VerifySemanticValidation(ValidationTestModelBuilder.AnnotationElementFullNameShouldBeUnique(this.EdmVersion), expectedErrors);
 }
开发者ID:larsenjo,项目名称:odata.net,代码行数:8,代码来源:AnnotationsOnNonRepresentedElementTests.cs

示例6: BadCollectionTermItemOfIncorrectType

 public void BadCollectionTermItemOfIncorrectType()
 {
     var expectedErrors = new EdmLibTestErrors()
     {
         {9, 14, EdmErrorCode.ExpressionPrimitiveKindNotValidForAssertedType}
     };
     this.VerifySemanticValidation(ExpressionValidationTestModelBuilder.BadCollectionTermItemOfIncorrectType(this.EdmVersion), expectedErrors);
 }
开发者ID:larsenjo,项目名称:odata.net,代码行数:8,代码来源:ExpressionSemanticValidationTest.cs

示例7: ValidateNavigationMultiplePrincipalWithAllNullableDependentCsdl

 public void ValidateNavigationMultiplePrincipalWithAllNullableDependentCsdl()
 {
     var expectedErrors = new EdmLibTestErrors()
     {
         { null, null, EdmErrorCode.InvalidMultiplicityOfPrincipalEnd }
     };
     this.VerifySemanticValidation(NavigationTestModelBuilder.NavigationMultiplePrincipalWithAllNullableDependentCsdl(), EdmVersion.V40, expectedErrors);
 }
开发者ID:AlineGuan,项目名称:odata.net,代码行数:8,代码来源:NavigationValidationTests.cs

示例8: CannotReconcilePrimitiveExpressionWithNonPrimitiveType

 public void CannotReconcilePrimitiveExpressionWithNonPrimitiveType()
 {
     var expectedErrors = new EdmLibTestErrors() 
     {
         {5, 6, EdmErrorCode.PrimitiveConstantExpressionNotValidForNonPrimitiveType}
     };
     this.VerifySemanticValidation(ExpressionValidationTestModelBuilder.PrimitiveForNonPrimitiveTerm(this.EdmVersion), expectedErrors);
 }
开发者ID:larsenjo,项目名称:odata.net,代码行数:8,代码来源:ExpressionSemanticValidationTest.cs

示例9: ValueAnnotation_TargetNotResolvable

        public void ValueAnnotation_TargetNotResolvable()
        {
            var expectedErrors = new EdmLibTestErrors()
            {
                {8, 6, EdmErrorCode.BadUnresolvedType},
            };

            this.VerifySemanticValidation(VocabularyTestModelBuilder.ValueAnnotationTargetNotResolvableCsdl(), expectedErrors);
        }
开发者ID:AlineGuan,项目名称:odata.net,代码行数:9,代码来源:VocabularyValidationTests.cs

示例10: ValueTerm_NameConflict_WithOthers

        public void ValueTerm_NameConflict_WithOthers()
        {
            var expectedErrors = new EdmLibTestErrors()
            {
                {3, 4, EdmErrorCode.AlreadyDefined},
            };

            this.VerifySemanticValidation(VocabularyTestModelBuilder.ValueTermNameConflictWithOthersCsdl(), expectedErrors);
        }
开发者ID:AlineGuan,项目名称:odata.net,代码行数:9,代码来源:VocabularyValidationTests.cs

示例11: ValidateEntityContainerAnnotationElementSupportInV40

        public void ValidateEntityContainerAnnotationElementSupportInV40()
        {
            var expectedErrors = new EdmLibTestErrors()
            {
                { 5, 6, EdmErrorCode.DuplicateDirectValueAnnotationFullName}, 
            };

            this.VerifySemanticValidation(ValidationTestModelBuilder.EntityContainerAnnotationElementSupportInV40(EdmVersion.V40), EdmVersion.V40, expectedErrors);
        }
开发者ID:larsenjo,项目名称:odata.net,代码行数:9,代码来源:AnnotationsOnNonRepresentedElementTests.cs

示例12: ValidateValueAnnotationInvalidFloatConstantAttributeCsdl

        public void ValidateValueAnnotationInvalidFloatConstantAttributeCsdl()
        {
            var expectedErrors = new EdmLibTestErrors()
            {
                { null, null, EdmErrorCode.InvalidFloatingPoint }
            };

            this.VerifySemanticValidation(ConstantExpressionModelBuilder.ValueAnnotationInvalidFloatConstantAttributeCsdl(), EdmVersion.V40, expectedErrors);
        }
开发者ID:AlineGuan,项目名称:odata.net,代码行数:9,代码来源:ConstantExpressionValidationTests.cs

示例13: SerializerTestNoContentModel

 public void SerializerTestNoContentModel()
 {
     IEnumerable<EdmError> actualSerializationErrors;
     IEnumerable<EdmError> expectedSerializationErrors = new EdmLibTestErrors() 
     {
         {0, 0, EdmErrorCode.NoSchemasProduced},
     };
     IEnumerable<string> csdlStrings = this.GetSerializerResult(new EdmModel(), out actualSerializationErrors);
     Assert.AreEqual(0, csdlStrings.Count(), "CsdlWriter.WriteCsdl should not generate no ");
     CompareErrors(actualSerializationErrors, expectedSerializationErrors);
 }
开发者ID:AlineGuan,项目名称:odata.net,代码行数:11,代码来源:SerializerTests.cs

示例14: TestInterfaceCriticalKindValueMismatchOnlyModel

        public void TestInterfaceCriticalKindValueMismatchOnlyModel()
        {
            var expectedErrors = new EdmLibTestErrors()
            {
                { null, null, EdmErrorCode.InterfaceCriticalKindValueMismatch }
            };

            var model = InterfaceCriticalModelBuilder.InterfaceCriticalKindValueMismatchOnlyModel();

            this.ValidateUsingEdmValidator(model, expectedErrors);
            this.ValidateUsingEdmValidator(model, EdmConstants.EdmVersion4, expectedErrors);
            this.ValidateUsingEdmValidator(model, ValidationRuleSet.GetEdmModelRuleSet(EdmConstants.EdmVersion4), expectedErrors);
        }
开发者ID:larsenjo,项目名称:odata.net,代码行数:13,代码来源:InterfaceCriticalTests.cs

示例15: TestInterfaceCriticalPropertyValueMustNotBeNullCsdl

        public void TestInterfaceCriticalPropertyValueMustNotBeNullCsdl()
        {
            var expectedErrors = new EdmLibTestErrors()
            {
                { null, null, EdmErrorCode.InterfaceCriticalPropertyValueMustNotBeNull }
            };

            var csdls = InterfaceCriticalModelBuilder.InterfaceCriticalPropertyValueMustNotBeNullOnlyCsdl();
            var model = this.GetParserResult(csdls);

            this.ValidateUsingEdmValidator(model, expectedErrors);
            this.ValidateUsingEdmValidator(model, EdmConstants.EdmVersion4, expectedErrors);
            this.ValidateUsingEdmValidator(model, ValidationRuleSet.GetEdmModelRuleSet(EdmConstants.EdmVersion4), expectedErrors);
        }
开发者ID:larsenjo,项目名称:odata.net,代码行数:14,代码来源:InterfaceCriticalTests.cs


注:本文中的EdmLibTestErrors类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。