Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }