public void TestInterfaceCriticalPropertyValueMustNotBeNullUsingOperationParameterDeclaredTypeModel() { var expectedErrors = new EdmLibTestErrors() { { null, null, EdmErrorCode.InterfaceCriticalPropertyValueMustNotBeNull } }; var model = InterfaceCriticalModelBuilder.InterfaceCriticalPropertyValueMustNotBeNullUsingOperationParameterDeclaredTypeModel(); this.ValidateUsingEdmValidator(model, expectedErrors); this.ValidateUsingEdmValidator(model, EdmConstants.EdmVersion4, expectedErrors); this.ValidateUsingEdmValidator(model, ValidationRuleSet.GetEdmModelRuleSet(EdmConstants.EdmVersion4), expectedErrors); }
public void TestEdmExpressionKindInterfaceCriticalKindValueUnexpectedOnlyModel() { var expectedErrors = new EdmLibTestErrors() { { null, null, EdmErrorCode.InterfaceCriticalKindValueUnexpected } }; var model = InterfaceCriticalModelBuilder.EdmExpressionKindInterfaceCriticalKindValueUnexpectedOnlyModel(); this.ValidateUsingEdmValidator(model, expectedErrors); this.ValidateUsingEdmValidator(model, EdmConstants.EdmVersion4, expectedErrors); this.ValidateUsingEdmValidator(model, ValidationRuleSet.GetEdmModelRuleSet(EdmConstants.EdmVersion4), expectedErrors); }
public void TestInterfaceCriticalEnumerableMustNotHaveNullElementsOnlyModel() { var expectedErrors = new EdmLibTestErrors() { { null, null, EdmErrorCode.InterfaceCriticalEnumerableMustNotHaveNullElements } }; var model = InterfaceCriticalModelBuilder.InterfaceCriticalEnumerableMustNotHaveNullElementsOnlyModel(); this.ValidateUsingEdmValidator(model, expectedErrors); this.ValidateUsingEdmValidator(model, EdmConstants.EdmVersion4, expectedErrors); this.ValidateUsingEdmValidator(model, ValidationRuleSet.GetEdmModelRuleSet(EdmConstants.EdmVersion4), expectedErrors); }
public void TestInterfaceCriticalKindValueMismatchOnlyUsingEnumTypeReferenceModel() { var expectedErrors = new EdmLibTestErrors() { { null, null, EdmErrorCode.InterfaceCriticalKindValueMismatch } }; var model = InterfaceCriticalModelBuilder.InterfaceCriticalKindValueMismatchOnlyUsingEnumTypeReferenceModel(); this.ValidateUsingEdmValidator(model, expectedErrors); this.ValidateUsingEdmValidator(model, EdmConstants.EdmVersion4, expectedErrors); this.ValidateUsingEdmValidator(model, ValidationRuleSet.GetEdmModelRuleSet(EdmConstants.EdmVersion4), expectedErrors); }
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); }
public void TestInterfaceCriticalNavigationPartnerInvalidOnlyCsdl() { var expectedErrors = new EdmLibTestErrors() { { null, null, EdmErrorCode.InterfaceCriticalNavigationPartnerInvalid }, { null, null, EdmErrorCode.BadUnresolvedNavigationPropertyPath } }; var csdls = InterfaceCriticalModelBuilder.InterfaceCriticalNavigationPartnerInvalidOnlyCsdl(); var model = this.GetParserResult(csdls); this.ValidateUsingEdmValidator(model, expectedErrors); this.ValidateUsingEdmValidator(model, ValidationRuleSet.GetEdmModelRuleSet(EdmConstants.EdmVersion4), expectedErrors); this.ValidateUsingEdmValidator(model, EdmConstants.EdmVersion4, expectedErrors); }
public void TestElementInterfaceCriticalKindValueUnexpected() { var expectedErrors = new EdmLibTestErrors() { { null, null, EdmErrorCode.InterfaceCriticalKindValueUnexpected } }; var model = InterfaceCriticalModelBuilder.EdmTypeKindInterfaceCriticalKindValueUnexpectedOnlyModel(); this.ValidateElement(model, expectedErrors); var entity = model.SchemaElements.OfType <IEdmEntityType>().ElementAt(0); this.ValidateElement(entity, expectedErrors); }
public void TestAllInterfaceCriticalModel() { var expectedErrors = new EdmLibTestErrors() { { null, null, EdmErrorCode.InterfaceCriticalEnumerableMustNotHaveNullElements }, { null, null, EdmErrorCode.InterfaceCriticalKindValueMismatch }, { null, null, EdmErrorCode.InterfaceCriticalKindValueUnexpected }, { null, null, EdmErrorCode.InterfaceCriticalNavigationPartnerInvalid }, { null, null, EdmErrorCode.InterfaceCriticalPropertyValueMustNotBeNull }, { null, null, EdmErrorCode.InterfaceCriticalPropertyValueMustNotBeNull }, }; var model = InterfaceCriticalModelBuilder.AllInterfaceCriticalModel(); this.ValidateUsingEdmValidator(model, expectedErrors); this.ValidateUsingEdmValidator(model, EdmConstants.EdmVersion4, expectedErrors); this.ValidateUsingEdmValidator(model, ValidationRuleSet.GetEdmModelRuleSet(EdmConstants.EdmVersion4), expectedErrors); }
public void TestElementInterfaceCriticalKindValueMismatch() { var expectedErrors = new EdmLibTestErrors() { { null, null, EdmErrorCode.InterfaceCriticalKindValueMismatch } }; var model = InterfaceCriticalModelBuilder.InterfaceCriticalKindValueMismatchOnlyModel(); this.ValidateElement(model, expectedErrors); var valueAnnotation = model.VocabularyAnnotations.OfType <IEdmValueAnnotation>().ElementAt(0); this.ValidateElement(valueAnnotation, expectedErrors); var annotationValue = valueAnnotation.Value; this.ValidateElement(annotationValue, expectedErrors); }