예제 #1
0
        public void XElementAnnotationTestAnnotationWithValueModel()
        {
            XElement expectedAnnotation =
                new XElement("{http://foo}Annotation",
                             "Value 1.0"
                             );

            AnnotationInfo annotationInfo = new AnnotationInfo()
            {
                Namespace = "http://foo", Name = "Annotation"
            };

            List <ElementInfo> annotationPath = new List <ElementInfo>()
            {
                new ElementInfo()
                {
                    Name = "SimpleFunction", Type = AnnotatableElementType.Function
                },
                new ElementInfo()
                {
                    Name = "Id", Type = AnnotatableElementType.Parameter
                }
            };
            ElementLocation annotationLocation = new ElementLocation()
            {
                Namespace = "DefaultNamespace", ElementPath = annotationPath
            };

            this.AnnotationRoundTripCsdlCheck(XElementAnnotationModelBuilder.AnnotationWithValueCsdl(), expectedAnnotation, annotationInfo, annotationLocation, XElementAnnotationModelBuilder.AnnotationWithValueModel());
        }