Examples of MockTransactionReportManager


Examples of com.dianping.cat.consumer.transaction.Configurator.MockTransactionReportManager

    try {
      TransactionAnalyzer transactionAnalyzer = (TransactionAnalyzer) lookup(MessageAnalyzer.class,
            TransactionAnalyzer.ID);
      TransactionDelegate transactionDelegate = (TransactionDelegate) lookup(ReportDelegate.class, "transaction");
      MockTransactionReportManager transactionManager = (MockTransactionReportManager) lookup(ReportManager.class,
            "transaction");

      String xml = Files.forIO().readFrom(TransactionAnalyzerTest.class.getResourceAsStream("transaction_real.xml"),
            "utf-8");
      TransactionReport transactionReport = transactionDelegate.parseXml(xml);
      rebuildTransactionReport(transactionReport);
      transactionManager.setReport(transactionReport);

      ProblemAnalyzer problemAnalyzer = (ProblemAnalyzer) lookup(MessageAnalyzer.class, ProblemAnalyzer.ID);
      ProblemDelegate problemDelegate = (ProblemDelegate) lookup(ReportDelegate.class, "problem");
      MockProblemReportManager problemManager = (MockProblemReportManager) lookup(ReportManager.class, "problem");
      xml = Files.forIO().readFrom(ProblemAnalyzerTest.class.getResourceAsStream("problem-report.xml"), "utf-8");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.