public void XMLFragment_TestStringXML6() { PDFXMLFragmentParser parser = new PDFXMLFragmentParser(); try { List <Scryber.Text.PDFTextOp> all = parser.Parse(TestXml6_1, false); throw new ArgumentException("Required exception not thrown"); } catch (PDFXmlFormatException ex) { TestContext.WriteLine("Successfully caught the exception from invalid xml :" + ex.Message); } parser = new PDFXMLFragmentParser(); try { List <Scryber.Text.PDFTextOp> all = parser.Parse(TestXml6_2, false); throw new ArgumentException("Required exception not thrown"); } catch (PDFXmlFormatException ex) { TestContext.WriteLine("Successfully caught the exception from invalid xml : " + ex.Message); } }
public void XMLFragment_TestStringXML0() { PDFXMLFragmentParser parser = new PDFXMLFragmentParser(); List <Scryber.Text.PDFTextOp> all = parser.Parse(TestXml0, false); for (int i = 0; i < all.Count; i++) { TestContext.WriteLine("{0} Operation: '{1}'", i, all[i]); Assert.AreEqual(all[i], MatchXml0[i]); } }