Exemplo n.º 1
0
        public void XmlReadWrite_DeserializeXmlWithValidationErrors()
        {
            string xml = TestUtils.ReadResourceStream("EdiEngine.Tests.TestData.940.ERR.xml");

            M_940        map = new M_940();
            XmlMapReader r   = new XmlMapReader(map);

            EdiTrans t = r.ReadToEnd(xml);

            Assert.AreEqual(2, t.ValidationErrors.Count);
        }
Exemplo n.º 2
0
        public void JsonReadWrite_DeserializeJsonWithValidationErrors()
        {
            string json = TestUtils.ReadResourceStream("EdiEngine.Tests.TestData.940.ERR.json");

            M_940         map = new M_940();
            JsonMapReader r   = new JsonMapReader(map);

            EdiTrans t = r.ReadToEnd(json);

            Assert.AreEqual(2, t.ValidationErrors.Count);
        }
Exemplo n.º 3
0
        public void XmlReadWrite_DeserializeXmlOK()
        {
            string xml = TestUtils.ReadResourceStream("EdiEngine.Tests.TestData.940.OK.xml");

            M_940        map = new M_940();
            XmlMapReader r   = new XmlMapReader(map);

            EdiTrans t = r.ReadToEnd(xml);

            Assert.AreEqual(0, t.ValidationErrors.Count);

            //string edi = TestUtils.WriteEdiEnvelope(t, "SH");
        }