Ejemplo n.º 1
0
        public void XElementAnnotationTestNavigationPropertyWithAnnotationModel()
        {
            XElement expectedAnnotation =
                new XElement("{http://foo}Annotation", 1);

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

            List <ElementInfo> annotationPath = new List <ElementInfo>()
            {
                new ElementInfo()
                {
                    Name = "Person", Type = AnnotatableElementType.EntityType
                },
                new ElementInfo()
                {
                    Name = "Friends", Type = AnnotatableElementType.NavigationProperty
                }
            };
            ElementLocation annotationLocation = new ElementLocation()
            {
                Namespace = "DefaultNamespace", ElementPath = annotationPath
            };

            this.AnnotationRoundTripCsdlCheck(XElementAnnotationModelBuilder.NavigationPropertyWithAnnotationCsdl(), expectedAnnotation, annotationInfo, annotationLocation, XElementAnnotationModelBuilder.NavigationPropertyWithAnnotationModel());
        }