本文整理汇总了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);
}
示例2: NullCannotBeAssertedToBeANonNullableType
public void NullCannotBeAssertedToBeANonNullableType()
{
var expectedErrors = new EdmLibTestErrors()
{
{6, 8, EdmErrorCode.NullCannotBeAssertedToBeANonNullableType}
};
this.VerifySemanticValidation(ExpressionValidationTestModelBuilder.NullForNonNullableTerm(this.EdmVersion), expectedErrors);
}
示例3: IncorrectPrimitiveTypeForTerm
public void IncorrectPrimitiveTypeForTerm()
{
var expectedErrors = new EdmLibTestErrors()
{
{5, 6, EdmErrorCode.ExpressionPrimitiveKindNotValidForAssertedType}
};
this.VerifySemanticValidation(ExpressionValidationTestModelBuilder.IncorrectPrimitiveTypeForTerm(this.EdmVersion), expectedErrors);
}
示例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);
}
示例5: ValidateAnnotationElementFullNameShouldBeUnique
public void ValidateAnnotationElementFullNameShouldBeUnique()
{
var expectedErrors = new EdmLibTestErrors()
{
{ null, null, EdmErrorCode.DuplicateDirectValueAnnotationFullName}
};
this.VerifySemanticValidation(ValidationTestModelBuilder.AnnotationElementFullNameShouldBeUnique(this.EdmVersion), expectedErrors);
}
示例6: BadCollectionTermItemOfIncorrectType
public void BadCollectionTermItemOfIncorrectType()
{
var expectedErrors = new EdmLibTestErrors()
{
{9, 14, EdmErrorCode.ExpressionPrimitiveKindNotValidForAssertedType}
};
this.VerifySemanticValidation(ExpressionValidationTestModelBuilder.BadCollectionTermItemOfIncorrectType(this.EdmVersion), expectedErrors);
}
示例7: ValidateNavigationMultiplePrincipalWithAllNullableDependentCsdl
public void ValidateNavigationMultiplePrincipalWithAllNullableDependentCsdl()
{
var expectedErrors = new EdmLibTestErrors()
{
{ null, null, EdmErrorCode.InvalidMultiplicityOfPrincipalEnd }
};
this.VerifySemanticValidation(NavigationTestModelBuilder.NavigationMultiplePrincipalWithAllNullableDependentCsdl(), EdmVersion.V40, expectedErrors);
}
示例8: CannotReconcilePrimitiveExpressionWithNonPrimitiveType
public void CannotReconcilePrimitiveExpressionWithNonPrimitiveType()
{
var expectedErrors = new EdmLibTestErrors()
{
{5, 6, EdmErrorCode.PrimitiveConstantExpressionNotValidForNonPrimitiveType}
};
this.VerifySemanticValidation(ExpressionValidationTestModelBuilder.PrimitiveForNonPrimitiveTerm(this.EdmVersion), expectedErrors);
}
示例9: ValueAnnotation_TargetNotResolvable
public void ValueAnnotation_TargetNotResolvable()
{
var expectedErrors = new EdmLibTestErrors()
{
{8, 6, EdmErrorCode.BadUnresolvedType},
};
this.VerifySemanticValidation(VocabularyTestModelBuilder.ValueAnnotationTargetNotResolvableCsdl(), expectedErrors);
}
示例10: ValueTerm_NameConflict_WithOthers
public void ValueTerm_NameConflict_WithOthers()
{
var expectedErrors = new EdmLibTestErrors()
{
{3, 4, EdmErrorCode.AlreadyDefined},
};
this.VerifySemanticValidation(VocabularyTestModelBuilder.ValueTermNameConflictWithOthersCsdl(), expectedErrors);
}
示例11: ValidateEntityContainerAnnotationElementSupportInV40
public void ValidateEntityContainerAnnotationElementSupportInV40()
{
var expectedErrors = new EdmLibTestErrors()
{
{ 5, 6, EdmErrorCode.DuplicateDirectValueAnnotationFullName},
};
this.VerifySemanticValidation(ValidationTestModelBuilder.EntityContainerAnnotationElementSupportInV40(EdmVersion.V40), EdmVersion.V40, expectedErrors);
}
示例12: ValidateValueAnnotationInvalidFloatConstantAttributeCsdl
public void ValidateValueAnnotationInvalidFloatConstantAttributeCsdl()
{
var expectedErrors = new EdmLibTestErrors()
{
{ null, null, EdmErrorCode.InvalidFloatingPoint }
};
this.VerifySemanticValidation(ConstantExpressionModelBuilder.ValueAnnotationInvalidFloatConstantAttributeCsdl(), EdmVersion.V40, expectedErrors);
}
示例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);
}
示例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);
}
示例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);
}