Package com.dianping.cat.consumer.transaction.model.transform

Examples of com.dianping.cat.consumer.transaction.model.transform.DefaultXmlBuilder


    TransactionReportMerger merger = new HistoryTransactionReportMerger(new TransactionReport(report1.getDomain()));

    report1.accept(merger);
    report2.accept(merger);

    String actual = new DefaultXmlBuilder().buildXml(merger.getTransactionReport());

    Assert.assertEquals("Check the merge result!", expected.replace("\r", ""), actual.replace("\r", ""));

  }
View Full Code Here


public class TransactionReportTest {
  @Test
  public void testXml() throws Exception {
    String source = Files.forIO().readFrom(getClass().getResourceAsStream("transaction_report.xml"), "utf-8");
    TransactionReport report = DefaultSaxParser.parse(source);
    String xml = new DefaultXmlBuilder().buildXml(report);
    String expected = source;

    Assert.assertEquals("XML is not well parsed!", expected.replace("\r", ""), xml.replace("\r", ""));
  }
View Full Code Here

TOP

Related Classes of com.dianping.cat.consumer.transaction.model.transform.DefaultXmlBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.