Example #1
0
        public void XElementAnnotationTestDifferentAnnotationNamespaceModel()
        {
            XElement expectedAnnotation =
                new XElement("{http://foo}Annotation",
                             new XElement("{http://foo1}Child",
                                          new XElement("{http://foo2}GrandChild",
                                                       "1"
                                                       )
                                          )
                             );

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

            List <ElementInfo> annotationPath = new List <ElementInfo>()
            {
                new ElementInfo()
                {
                    Name = "Container", Type = AnnotatableElementType.EntityContainer
                },
                new ElementInfo()
                {
                    Name = "SimpleSet", Type = AnnotatableElementType.EntitySet
                }
            };
            ElementLocation annotationLocation = new ElementLocation()
            {
                Namespace = "DefaultNamespace", ElementPath = annotationPath
            };

            this.AnnotationRoundTripCsdlCheck(XElementAnnotationModelBuilder.DifferentAnnotationNamespaceCsdl(), expectedAnnotation, annotationInfo, annotationLocation, XElementAnnotationModelBuilder.DifferentAnnotationNamespaceModel());
        }