コード例 #1
0
        protected void BasicRoundtripTest(IEnumerable <XElement> csdlElements)
        {
            IEdmModel resultEdmModel = this.GetParserResult(csdlElements);

            CsdlToEdmModelComparer.Compare(csdlElements, resultEdmModel);

            IEnumerable <EdmError> errors;
            var resultCsdlElements = this.GetSerializerResult(resultEdmModel, out errors).ToArray();

            ExceptionUtilities.Assert(!errors.Any(), "Did not expect serializer errors: " + string.Join(",", errors.Select(e => e.ErrorMessage)));
#if !SILVERLIGHT
            var csdl = PrettyPrintCsdl(resultCsdlElements) + Environment.NewLine;
            Approvals.Verify(new ApprovalTextWriter(csdl), new CustomSourcePathNamer(this.TestContext.DeploymentDirectory), Approvals.GetReporter());
#endif
        }
コード例 #2
0
 private void VerifyParserResult(IEnumerable <XElement> csdl, IEdmModel model)
 {
     CsdlToEdmModelComparer.Compare(csdl, model);
 }