示例#1
0
        public void XElementAnnotationTestNestedXElementWithValueModel()
        {
            XElement expectedAnnotation =
                new XElement("{http://foo}Annotation",
                             "1",
                             new XElement("{http://foo}Child",
                                          "2",
                                          new XElement("{http://foo}GrandChild",
                                                       "3",
                                                       new XElement("{http://foo}GreatGrandChild",
                                                                    "4",
                                                                    new XElement("{http://foo}GreateGreatGrandChild", "5")
                                                                    )
                                                       )
                                          )
                             );

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

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

            this.AnnotationRoundTripCsdlCheck(XElementAnnotationModelBuilder.NestedXElementWithValueCsdl(), expectedAnnotation, annotationInfo, annotationLocation, XElementAnnotationModelBuilder.NestedXElementWithValueModel());
        }