Examples of DetailedDiff


Examples of org.custommonkey.xmlunit.DetailedDiff

            + "<faultstring>Dummy Exception</faultstring>\n" + "<detail>\n"
            + "<Exception>java.lang.IllegalStateException: Dummy Exception\n\tat" + "</Exception>\n" + "</detail>\n"
            + "</SOAP:Fault>\n"));
        XMLUnit.setIgnoreWhitespace(true);
        try {
            DetailedDiff diffs = new DetailedDiff(XMLUnit.compareXML(expected, StubbedChannel.getOutput()));
            List allDiffs = diffs.getAllDifferences();
            assertEquals("Only expected 1 difference", 1, allDiffs.size());
            Difference diff = (Difference) allDiffs.get(0);
            String expectedDiffPath = "/Envelope[1]/Body[1]/Fault[1]/detail[1]/Exception[1]/text()[1]";
            assertEquals("Expected difference to be at " + expectedDiffPath, expectedDiffPath, diff.getTestNodeDetail()
                .getXpathLocation());
View Full Code Here

Examples of org.custommonkey.xmlunit.DetailedDiff

      report.getParameterValues().put("time_stop", "2005-05-31");//$NON-NLS-1$ //$NON-NLS-2$
      report.getParameterValues().put("time_start", "2005-01-01");//$NON-NLS-1$ //$NON-NLS-2$
      XmlDebugReportUtil.createPageable(report, outputFilename);
      //XmlDebugReportUtil.createFlowTable(report, outputFilename);
      // Comparing the File just generated with the golden version
      DetailedDiff myDiff = new DetailedDiff(compareXML(readFileAsString(inputFileName),
          readFileAsString(outputFilename)));
      allDifferences = myDiff.getAllDifferences();

      if (myDiff != null && myDiff.toString() != null) {
        FileOutputStream outputStream = new FileOutputStream(logFile);
        outputStream.write(myDiff.toString().getBytes());
        outputStream.flush();
        outputStream.close();
      }
      // Done!
      System.err.println("Done!");//$NON-NLS-1$
View Full Code Here

Examples of org.custommonkey.xmlunit.DetailedDiff

      report.getParameterValues().put("productline_name", "All Product Lines");//$NON-NLS-1$ //$NON-NLS-2$
      report.getParameterValues().put("time_stop", "2005-05-31");//$NON-NLS-1$ //$NON-NLS-2$
      report.getParameterValues().put("time_start", "2005-01-01");//$NON-NLS-1$ //$NON-NLS-2$
      XmlDebugReportUtil.createFlowTable(report, outputFilename);
      // Comparing the File just generated with the golden version
      DetailedDiff myDiff = new DetailedDiff(compareXML(readFileAsString(inputFileName),
          readFileAsString(outputFilename)));
      allDifferences = myDiff.getAllDifferences();

      if (myDiff != null && myDiff.toString() != null) {
        FileOutputStream outputStream = new FileOutputStream(logFile);
        outputStream.write(myDiff.toString().getBytes());
        outputStream.flush();
        outputStream.close();
      }
      // Done!
      System.err.println("Done!");//$NON-NLS-1$
View Full Code Here

Examples of org.custommonkey.xmlunit.DetailedDiff

      SalesByTerritoryReportData reportData = new SalesByTerritoryReportData();
      TableDataFactory tableDataFactory = new TableDataFactory("default", reportData);//$NON-NLS-1$
      report.setDataFactory(tableDataFactory);
      XmlDebugReportUtil.createPageable(report, outputFilename);
      // Comparing the File just generated with the golden version
      DetailedDiff myDiff = new DetailedDiff(compareXML(readFileAsString(inputFileName),
          readFileAsString(outputFilename)));
      allDifferences = myDiff.getAllDifferences();

      if (myDiff != null && myDiff.toString() != null) {
        FileOutputStream outputStream = new FileOutputStream(logFile);
        outputStream.write(myDiff.toString().getBytes());
        outputStream.flush();
        outputStream.close();
      }
    } catch (Throwable t) {
      t.printStackTrace();
View Full Code Here

Examples of org.custommonkey.xmlunit.DetailedDiff

      SalesByTerritoryReportData reportData = new SalesByTerritoryReportData();
      TableDataFactory tableDataFactory = new TableDataFactory("default", reportData);//$NON-NLS-1$
      report.setDataFactory(tableDataFactory);
      XmlDebugReportUtil.createFlowTable(report, outputFilename);
      // Comparing the File just generated with the golden version
      DetailedDiff myDiff = new DetailedDiff(compareXML(readFileAsString(inputFileName),
          readFileAsString(outputFilename)));
      allDifferences = myDiff.getAllDifferences();

      if (myDiff != null && myDiff.toString() != null) {
        FileOutputStream outputStream = new FileOutputStream(logFile);
        outputStream.write(myDiff.toString().getBytes());
        outputStream.flush();
        outputStream.close();
      }
    } catch (Throwable t) {
      t.printStackTrace();
View Full Code Here

Examples of org.custommonkey.xmlunit.DetailedDiff

      IncomeStatementReportData reportData = new IncomeStatementReportData();
      TableDataFactory tableDataFactory = new TableDataFactory("default", reportData);//$NON-NLS-1$
      report.setDataFactory(tableDataFactory);
      XmlDebugReportUtil.createPageable(report, outputFilename);
      // Comparing the File just generated with the golden version
      DetailedDiff myDiff = new DetailedDiff(compareXML(readFileAsString(inputFileName),
          readFileAsString(outputFilename)));
      allDifferences = myDiff.getAllDifferences();

      if (myDiff != null && myDiff.toString() != null) {
        FileOutputStream outputStream = new FileOutputStream(logFile);
        outputStream.write(myDiff.toString().getBytes());
        outputStream.flush();
        outputStream.close();
      }
      // Done!
      System.err.println("Done!");//$NON-NLS-1$
View Full Code Here

Examples of org.custommonkey.xmlunit.DetailedDiff

      IncomeStatementReportData reportData = new IncomeStatementReportData();
      TableDataFactory tableDataFactory = new TableDataFactory("default", reportData);//$NON-NLS-1$
      report.setDataFactory(tableDataFactory);
      XmlDebugReportUtil.createFlowTable(report, outputFilename);
      // Comparing the File just generated with the golden version
      DetailedDiff myDiff = new DetailedDiff(compareXML(readFileAsString(inputFileName),
          readFileAsString(outputFilename)));
      allDifferences = myDiff.getAllDifferences();

      if (myDiff != null && myDiff.toString() != null) {
        FileOutputStream outputStream = new FileOutputStream(logFile);
        outputStream.write(myDiff.toString().getBytes());
        outputStream.flush();
        outputStream.close();
      }

      // Done!
View Full Code Here

Examples of org.custommonkey.xmlunit.DetailedDiff

      InventoryListReportData reportData = new InventoryListReportData();
      TableDataFactory tableDataFactory = new TableDataFactory("default", reportData);//$NON-NLS-1$
      report.setDataFactory(tableDataFactory);
      XmlDebugReportUtil.createPageable(report, outputFilename);
      // Comparing the File just generated with the golden version
      DetailedDiff myDiff = new DetailedDiff(compareXML(readFileAsString(inputFileName),
          readFileAsString(outputFilename)));
      allDifferences = myDiff.getAllDifferences();

      if (myDiff != null && myDiff.toString() != null) {
        FileOutputStream outputStream = new FileOutputStream(logFile);
        outputStream.write(myDiff.toString().getBytes());
        outputStream.flush();
        outputStream.close();
      }
      // Done!
      System.err.println("Done!");//$NON-NLS-1$
View Full Code Here

Examples of org.custommonkey.xmlunit.DetailedDiff

      InventoryListReportData reportData = new InventoryListReportData();
      TableDataFactory tableDataFactory = new TableDataFactory("default", reportData);//$NON-NLS-1$
      report.setDataFactory(tableDataFactory);
      XmlDebugReportUtil.createFlowTable(report, outputFilename);
      // Comparing the File just generated with the golden version
      DetailedDiff myDiff = new DetailedDiff(compareXML(readFileAsString(inputFileName),
          readFileAsString(outputFilename)));
      allDifferences = myDiff.getAllDifferences();

      if (myDiff != null && myDiff.toString() != null) {
        FileOutputStream outputStream = new FileOutputStream(logFile);
        outputStream.write(myDiff.toString().getBytes());
        outputStream.flush();
        outputStream.close();
      }

      // Done!
View Full Code Here

Examples of org.custommonkey.xmlunit.DetailedDiff

      report.getParameterValues().put("ShowCol", "Show_Column3");//$NON-NLS-1$ //$NON-NLS-2$
      report.getParameterValues().put("productline", "Motorcycles");//$NON-NLS-1$ //$NON-NLS-2$
     
      XmlDebugReportUtil.createPageable(report, outputFilename);
     // Comparing the File just generated with the golden version
     DetailedDiff myDiff = new DetailedDiff(compareXML(readFileAsString(inputFileName), readFileAsString(outputFilename)));
     allDifferences = myDiff.getAllDifferences();

     if(myDiff != null && myDiff.toString() != null) {
       FileOutputStream outputStream = new FileOutputStream(logFile);    
       outputStream.write(myDiff.toString().getBytes());
       outputStream.flush();
       outputStream.close();
     }
      // Done!
      System.err.println("Done!");//$NON-NLS-1$
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.