예제 #1
0
        public void ClrTypeMappingPrimitiveTypeToObject()
        {
            var edmModel   = this.GetParserResult(ClrTypeMappingTestModelBuilder.PrimitiveTypeBasicTest());
            var annotation = edmModel.FindVocabularyAnnotations(edmModel.FindType("NS1.Person")).Where(n => n.Term == edmModel.FindValueTerm("NS1.Title1")).Single();
            var edmValue   = new EdmToClrEvaluator(null).Evaluate(((IEdmValueAnnotation)annotation).Value);

            this.VerifyThrowsException(typeof(InvalidCastException), () => new EdmToClrConverter().AsClrValue <Coordination>(edmValue));
        }