public void ClrTypeMappingValueAnnotationEmptyValueAnnotations() { var edmModel = this.GetParserResult(ClrTypeMappingTestModelBuilder.ValueAnnotationEmptyValueAnnotations()); #if !SILVERLIGHT this.ValidateClrObjectConverter(this.GetValueAnnotations(edmModel, edmModel.FindType("NS1.Person"), "PersonValueAnnotation1").Single(), new ClassWithEnum() { EnumInt = EnumInt.Member2, EnumByte = EnumByte.Member1, EnumULong = (EnumULong)0 }); #endif this.ValidateClrObjectConverter(this.GetValueAnnotations(edmModel, edmModel.FindType("NS1.Person"), "PersonValueAnnotation1").Single(), new ClassWithCollectionProperty()); this.ValidateClrObjectConverter(this.GetValueAnnotations(edmModel, edmModel.FindType("NS1.Person"), "PersonValueAnnotation1").Single(), new ClassWithCollectionOfCollectionProperty()); this.ValidateClrObjectConverter(this.GetValueAnnotations(edmModel, edmModel.FindType("NS1.Person"), "PersonValueAnnotation1").Single(), new DisplayCoordination()); this.ValidateClrObjectConverter(this.GetValueAnnotations(edmModel, edmModel.FindType("NS1.Person"), "PersonValueAnnotation1").Single(), new EmptyClass()); this.VerifyThrowsException(typeof(InvalidCastException), () => this.ValidateClrObjectConverter(this.GetValueAnnotations(edmModel, edmModel.FindType("NS1.Person"), "PersonValueAnnotation1").Single(), (int)1) ); this.VerifyThrowsException(typeof(ArgumentNullException), () => this.ConvertToClrObject <int>(this.GetValueAnnotations(edmModel, edmModel.FindType("NS1.Person"), "PersonValueAnnotation2").Single()) ); }