Ejemplo n.º 1
0
        public void ClrTypeMappingValueAnnotationCollectionPropertyToNullListTest()
        {
            var edmModel        = this.GetParserResult(ClrTypeMappingTestModelBuilder.ValueAnnotationCollectionPropertyTest());
            var valueAnnotation = this.GetValueAnnotations(edmModel, edmModel.FindType("NS1.Person"), "PersonValueAnnotation").Single();

            this.VerifyThrowsException(typeof(System.ArgumentException), () => this.ConvertToClrObject <ClassWithNullCollectionProperty>(valueAnnotation));
        }
Ejemplo n.º 2
0
        public void ClrTypeMappingValueAnnotationCollectionPropertyTest()
        {
            var edmModel = this.GetParserResult(ClrTypeMappingTestModelBuilder.ValueAnnotationCollectionPropertyTest());

            var valueAnnotation = this.GetValueAnnotations(edmModel, edmModel.FindType("NS1.Person"), "PersonValueAnnotation").Single();

            this.ValidateClrObjectConverter(valueAnnotation,
                                            new ClassWithCollectionProperty()
            {
                X = new int[] { 4, 5 },
                Y = new int[] { 6, 7 },
                Z = new int[] { 8, 9 },
                C = new Display1[] {
                    new Display1()
                    {
                        X = 10, Y = 11
                    },
                    new Display1()
                    {
                        X = 12, Y = 13
                    }
                },
            });
        }