[jbpm-commits] JBoss JBPM SVN: r6772 - projects/migration_tool/trunk/src/test/java/test.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Oct 21 14:11:12 EDT 2010
Author: eschabell
Date: 2010-10-21 14:11:12 -0400 (Thu, 21 Oct 2010)
New Revision: 6772
Modified:
projects/migration_tool/trunk/src/test/java/test/XSLTTest.java
Log:
Extracted helper output dump of file to new method, added method comments.
Modified: projects/migration_tool/trunk/src/test/java/test/XSLTTest.java
===================================================================
--- projects/migration_tool/trunk/src/test/java/test/XSLTTest.java 2010-10-21 18:07:22 UTC (rev 6771)
+++ projects/migration_tool/trunk/src/test/java/test/XSLTTest.java 2010-10-21 18:11:12 UTC (rev 6772)
@@ -81,7 +81,16 @@
// transform jPDL task.
File resultFile = transformJpdlXml(transformer, dir, process);
- System.out.println("Reading from file.");
+ displayFileContents(resultFile);
+ }
+
+ /**
+ * Used to dump a file transformation results to the log.
+ *
+ * @param resultFile
+ */
+ private void displayFileContents(File resultFile) {
+ System.out.println("Reading from file.");
StringBuilder text = new StringBuilder();
String NL = System.getProperty("line.separator");
Scanner scanner = null;
@@ -97,8 +106,15 @@
scanner.close();
}
System.out.println("Text read in: " + text);
- }
+ }
+ /**
+ * Transformation of the input process definition to output format (bpmn).
+ * @param transformer
+ * @param dir
+ * @param process
+ * @return
+ */
public static File transformJpdlXml(Transformer transformer, String dir, String process) {
URL startURL = XSLTTest.class.getClassLoader().getResource(dir + "/" + procDefXML);
assertTrue( process + " JPDL URL could not be retrieved.", startURL != null );
More information about the jbpm-commits
mailing list