Index: /home/ekuns/workspace/castor-4/bin/CTFRun.bat
===================================================================
--- /home/ekuns/workspace/castor-4/bin/CTFRun.bat	(revision 6782)
+++ /home/ekuns/workspace/castor-4/bin/CTFRun.bat	(working copy)
@@ -13,7 +13,7 @@
 if "%1"=="regression" goto regression
 if "%1"=="master" goto master
 
-"%JAVA%" -classpath "%CP%" org.exolab.castor.tests.framework.CastorTestSuiteRunner %1 %2 %3 %4 %5 %6 %7
+"%JAVA%" -classpath "%CP%" org.castor.xmlctf.CastorTestSuiteRunner %1 %2 %3 %4 %5 %6 %7
 
 goto end
 
@@ -20,7 +20,7 @@
 :noargs
 :master
 echo using default arguments [-text ../src/tests/xml/MasterTestSuite]
-"%JAVA%" -classpath "%CP%" org.exolab.castor.tests.framework.CastorTestSuiteRunner -text ../xmlctf/tests/MasterTestSuite
+"%JAVA%" -classpath "%CP%" org.castor.xmlctf.CastorTestSuiteRunner -text ../xmlctf/tests/MasterTestSuite
 goto end
 
 :master-verbose
@@ -25,7 +25,7 @@
 
 :master-verbose
 echo using default verbose arguments [-text -verbose ../src/tests/xml/MasterTestSuite]
-"%JAVA%" -classpath "%CP%" org.exolab.castor.tests.framework.CastorTestSuiteRunner -text -verbose ../xmlctf/tests/MasterTestSuite
+"%JAVA%" -classpath "%CP%" org.castor.xmlctf.CastorTestSuiteRunner -text -verbose ../xmlctf/tests/MasterTestSuite
 goto end
 
 :regression
@@ -30,7 +30,7 @@
 
 :regression
 echo using default arguments [-text -verbose ../src/tests/xml/RegressionTestSuite]
-"%JAVA%" -classpath "%CP%" org.exolab.castor.tests.framework.CastorTestSuiteRunner -text ../xmlctf/tests/RegressionTestSuite
+"%JAVA%" -classpath "%CP%" org.castor.xmlctf.CastorTestSuiteRunner -text ../xmlctf/tests/RegressionTestSuite
 goto end
 
 :regression-verbose
@@ -35,7 +35,7 @@
 
 :regression-verbose
 echo using default arguments [-text -verbose ../src/tests/xml/RegressionTestSuite]
-"%JAVA%" -classpath "%CP%" org.exolab.castor.tests.framework.CastorTestSuiteRunner -text -verbose ../xmlctf/tests/RegressionTestSuite
+"%JAVA%" -classpath "%CP%" org.castor.xmlctf.CastorTestSuiteRunner -text -verbose ../xmlctf/tests/RegressionTestSuite
 goto end
 
 :end
Index: /home/ekuns/workspace/castor-4/bin/CTFRun.sh
===================================================================
--- /home/ekuns/workspace/castor-4/bin/CTFRun.sh	(revision 6781)
+++ /home/ekuns/workspace/castor-4/bin/CTFRun.sh	(working copy)
@@ -19,6 +19,7 @@
 BUILD_D=$CASTOR_HOME/xmlctf/build
 LIB_D=$CASTOR_HOME/lib
 
+CLASSPATH=$CASTOR_HOME/xmlctf/build
 CLASSPATH=$CLASSPATH:$CASTOR_HOME/xmlctf/build/classes
 CLASSPATH=$CLASSPATH:$CASTOR_HOME/build/classes
 CLASSPATH=$CLASSPATH:$CASTOR_HOME/codegen/build/classes
@@ -77,4 +78,4 @@
 
 # run the test
 #$JAVA -Xms512M -Xmx512M -cp $CLASSPATH org.exolab.castor.tests.framework.CastorTestSuiteRunner $WHICHTESTS $*
-$JAVA -cp $CLASSPATH org.exolab.castor.tests.framework.CastorTestSuiteRunner $WHICHTESTS $*
+$JAVA -cp $CLASSPATH org.castor.xmlctf.CastorTestSuiteRunner $WHICHTESTS $*
Index: /home/ekuns/workspace/castor-4/bin/CTFRunFromJAR.bat
===================================================================
--- /home/ekuns/workspace/castor-4/bin/CTFRunFromJAR.bat	(revision 6782)
+++ /home/ekuns/workspace/castor-4/bin/CTFRunFromJAR.bat	(working copy)
@@ -15,7 +15,7 @@
 if "%1"=="regression" goto regression
 if "%1"=="master" goto master
 
-"%JAVA%" -classpath "%CP%" org.exolab.castor.tests.framework.CastorTestSuiteRunner %1 %2 %3 %4 %5 %6 %7
+"%JAVA%" -classpath "%CP%" org.castor.xmlctf.CastorTestSuiteRunner %1 %2 %3 %4 %5 %6 %7
 
 goto end
 
@@ -22,7 +22,7 @@
 :noargs
 :master
 echo using default arguments [-text ../src/tests/xml/MasterTestSuite]
-"%JAVA%" -classpath "%CP%" org.exolab.castor.tests.framework.CastorTestSuiteRunner -text ../xmlctf/tests/MasterTestSuite
+"%JAVA%" -classpath "%CP%" org.castor.xmlctf.CastorTestSuiteRunner -text ../xmlctf/tests/MasterTestSuite
 goto end
 
 :master-verbose
@@ -27,7 +27,7 @@
 
 :master-verbose
 echo using default verbose arguments [-text -verbose ../src/tests/xml/MasterTestSuite]
-"%JAVA%" -classpath "%CP%" org.exolab.castor.tests.framework.CastorTestSuiteRunner -text -verbose ../xmlctf/tests/MasterTestSuite
+"%JAVA%" -classpath "%CP%" org.castor.xmlctf.CastorTestSuiteRunner -text -verbose ../xmlctf/tests/MasterTestSuite
 goto end
 
 :regression
@@ -32,7 +32,7 @@
 
 :regression
 echo using default arguments [-text -verbose ../src/tests/xml/RegressionTestSuite]
-"%JAVA%" -classpath "%CP%" org.exolab.castor.tests.framework.CastorTestSuiteRunner -text ../xmlctf/tests/RegressionTestSuite
+"%JAVA%" -classpath "%CP%" org.castor.xmlctf.CastorTestSuiteRunner -text ../xmlctf/tests/RegressionTestSuite
 goto end
 
 :regression-verbose
@@ -37,7 +37,7 @@
 
 :regression-verbose
 echo using default arguments [-text -verbose ../src/tests/xml/RegressionTestSuite]
-"%JAVA%" -classpath "%CP%" org.exolab.castor.tests.framework.CastorTestSuiteRunner -text -verbose ../xmlctf/tests/RegressionTestSuite
+"%JAVA%" -classpath "%CP%" org.castor.xmlctf.CastorTestSuiteRunner -text -verbose ../xmlctf/tests/RegressionTestSuite
 goto end
 
 :end
Index: /home/ekuns/workspace/castor-4/bin/CTFRunFromJAR.sh
===================================================================
--- /home/ekuns/workspace/castor-4/bin/CTFRunFromJAR.sh	(revision 6782)
+++ /home/ekuns/workspace/castor-4/bin/CTFRunFromJAR.sh	(working copy)
@@ -79,4 +79,4 @@
 
 # run the test
 #$JAVA -Xms512M -Xmx512M -cp $CLASSPATH org.exolab.castor.tests.framework.CastorTestSuiteRunner $WHICHTESTS $*
-$JAVA -cp $CLASSPATH org.exolab.castor.tests.framework.CastorTestSuiteRunner $WHICHTESTS $*
+$JAVA -cp $CLASSPATH org.castor.xmlctf.CastorTestSuiteRunner $WHICHTESTS $*
Index: /home/ekuns/workspace/castor-4/codegen/src/main/java/org/exolab/castor/builder/SourceFactory.java
===================================================================
--- /home/ekuns/workspace/castor-4/codegen/src/main/java/org/exolab/castor/builder/SourceFactory.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/codegen/src/main/java/org/exolab/castor/builder/SourceFactory.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -123,7 +123,7 @@
     private short _enumerationType = OBJECT_TYPE_ENUMERATION;
 
     /**
-     * A flag indicating whether or not to generate XML marshalling framework
+     * A flag indicating whether or not to generate XML marshaling framework
      * specific methods.
      */
     private boolean _createMarshalMethods = true;
@@ -161,12 +161,12 @@
     } //-- SourceFactory
 
    /**
-     * Sets whether or not to create the XML marshalling framework specific
-     * methods (marshall, unmarshall, validate) in the generated classes. By
+     * Sets whether or not to create the XML marshaling framework specific
+     * methods (marshal, unmarshal, validate) in the generated classes. By
      * default, these methods are generated.
      *
      * @param createMarshalMethods
-     *            a boolean, when true indicates to generated the marshalling
+     *            a boolean, when true indicates to generated the marshaling
      *            framework methods
      *
      */
@@ -208,7 +208,7 @@
      *            if true, indicates to implement CastorTestable
      */
     public void setTestable(final boolean testable) {
-           _testable = testable;
+        _testable = testable;
     }
 
    /**
@@ -490,7 +490,7 @@
 
     /**
      * Generate methods for our class.
-     * 
+     *
      * @param component
      * @param sgState
      * @param state
@@ -1254,7 +1254,7 @@
      } //CreateEqualsMethod
 
     /**
-     * Implement org.exolab.castor.tests.framework.CastorTestable im the given JClass.
+     * Implement org.castor.xmlctf.CastorTestable im the given JClass.
      *
      * @param jclass The JClass which will implement the CastorTestable Interface.
      * @param state our state, e.g., state of this Factory instance.
@@ -1264,9 +1264,9 @@
             throw new IllegalArgumentException("JClass must not be null");
          }
 
-        jclass.addInterface("org.exolab.castor.tests.framework.CastorTestable");
-        jclass.addImport("org.exolab.castor.tests.framework.CastorTestable");
-        jclass.addImport("org.exolab.castor.tests.framework.RandomHelper");
+        jclass.addInterface("org.castor.xmlctf.CastorTestable");
+        jclass.addImport("org.castor.xmlctf.CastorTestable");
+        jclass.addImport("org.castor.xmlctf.RandomHelper");
 
         createRandomizeFields(jclass, state); // implementation of randomizeFields
         createDumpFields(jclass);             // implementation of dumpFields
@@ -1274,7 +1274,7 @@
 
      /**
       * Creates the randomizeFields method for a class that implements the
-      * interface org.exolab.castor.tests.framework.CastorTestable.
+      * interface org.castor.xmlctf.CastorTestable.
       *
       * @param jclass The JClass which will implement the CastorTestable Interface.
       * @param state
@@ -1285,7 +1285,7 @@
                              "if we try to instantiate an abstract class or interface");
         jMethod.addException(new JClass("IllegalAccessException"),
                              "if we do not have access to the field, for example if it is private");
-        jMethod.setComment("implementation of org.exolab.castor.tests.framework.CastorTestable");
+        jMethod.setComment("implementation of org.castor.xmlctf.CastorTestable");
         jclass.addMethod(jMethod);
         JSourceCode jsc = jMethod.getSourceCode();
         JField[] fields = jclass.getFields();
@@ -1364,7 +1364,7 @@
 
     /**
      * Creates the dumpFields method for a class that implements the interface
-     * org.exolab.castor.tests.framework.CastorTestable.
+     * org.castor.xmlctf.CastorTestable.
      *
      * @param jclass The JClass which will implement the CastorTestable Interface.
      */
@@ -1371,7 +1371,7 @@
     private void createDumpFields(final JClass jclass) {
         JMethod jMethod = new JMethod("dumpFields", SGTypes.STRING,
                 "a String representation of all of the fields for " + jclass.getName());
-        jMethod.setComment("implementation of org.exolab.castor.tests.framework.CastorTestable");
+        jMethod.setComment("implementation of org.castor.xmlctf.CastorTestable");
         jclass.addMethod(jMethod);
         JSourceCode jsc = jMethod.getSourceCode();
         jsc.add("StringBuffer result = new StringBuffer(\"DumpFields() for element: ");
Index: /home/ekuns/workspace/castor-4/codegen/src/main/java/org/exolab/castor/builder/SourceGeneratorMain.java
===================================================================
--- /home/ekuns/workspace/castor-4/codegen/src/main/java/org/exolab/castor/builder/SourceGeneratorMain.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/codegen/src/main/java/org/exolab/castor/builder/SourceGeneratorMain.java	(working copy)
@@ -103,62 +103,62 @@
     /** Message used when descriptor creation is disabled. */
     private static final String DISABLE_DESCRIPTORS_MSG =
         "Disabling generation of Class descriptors.";
-    
-    /** Message used when marshalling methods creation is disabled. */
+
+    /** Message used when marshaling methods creation is disabled. */
     private static final String DISABLE_MARSHALL_MSG =
-        "Disabling generation of Marshalling framework methods (marshall, unmarshall, validate).";
-    
+        "Disabling generation of Marshaling framework methods (marshal, unmarshal, validate).";
+
     /** Message used when implementing CastorTestable. */
     private static final String CASTOR_TESTABLE_MSG =
-        "The generated classes will implement org.exolab.castor.tests.CastorTestable.";
-    
+        "The generated classes will implement org.castor.xmlctf.CastorTestable.";
+
     /** Message used when using SAX1. */
     private static final String SAX1_MSG =
         "The generated classes will use SAX 1.";
-    
+
     private static final String GENERATE_IMPORT_MSG =
         "Imported XML Schemas will be processed automatically.";
-    
+
     private static final String CASE_INSENSITIVE_MSG =
         "The generated classes will use a case insensitive method "
         + "for looking up enumerated type values.";
-    
+
     private static final String TYPE_FACTORY_ARG_MSG =
         "The argument '-type-factory' is deprecated; please use '-types' in its place.";
-    
+
     private static final String SUPPRESS_NON_FATAL_WARN_MSG =
         "Suppressing non fatal warnings.";
-    
+
     private static final String GENERATING_MAPPING_FILE_MSG =
         "Generating mapping file: ";
-    
+
     private static final String BINDING_FILE_ERROR1_MSG =
         "Unable to load binding file ";
-    
+
     private static final String BINDING_FILE_ERROR2_MSG =
         " due to the following Exception:";
-    
+
     private static final String BINDING_FILE_ERROR3_MSG =
         "No binding file will be used.";
-    
+
     private static final String INVALID_TYPES_OPTION_MSG =
         "Invalid option for '-types': ";
-    
+
     private static final String DEFAULT_FIELD_INFO_MSG =
         "Using default source generator types.";
-    
+
     private static final String LINE_SEPARATION_WIN_MSG =
         "Using Windows style line separation.";
-    
+
     private static final String LINE_SEPARATION_UNIX_MSG =
         "Using UNIX style line separation.";
-    
+
     private static final String LINE_SEPARATION_MAC_MSG =
         "Using Macintosh style line separation.";
-    
+
     private static final String DEFAULT_LINE_SEPARATOR_MSG =
         "Using default line separator for this platform";
-    
+
     private static final String INVALID_LINE_SEPARATOR_MSG =
         "Invalid option for line-separator: ";
 
@@ -434,11 +434,11 @@
         desc = "";
         allOptions.addFlag(ARGUMENT_TYPES_DEPRECATED, "collections class name", desc, true);
 
-        //-- no marshalling framework methods
-        desc = "Disables the generation of the methods specific to the XML marshalling framework.";
+        //-- no marshaling framework methods
+        desc = "Disables the generation of the methods specific to the XML marshaling framework.";
         allOptions.addFlag(ARGUMENT_NOMARSHALL, "", desc, true);
 
-        //-- implements org.exolab.castor.tests.CastorTestable?
+        //-- implements org.castor.xmlctf.CastorTestable?
         desc = "Implements some specific methods to allow the generated classes"
                 + " to be used with Castor Testing Framework.";
         allOptions.addFlag(ARGUMENT_TESTABLE, "", desc, true);
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/AntJavaCompiler.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/AntJavaCompiler.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/AntJavaCompiler.java	(working copy)
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 import java.io.File;
 import java.util.HashSet;
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/CastorTestable.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/CastorTestable.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/CastorTestable.java	(working copy)
@@ -42,7 +42,7 @@
  *
  * $Id$
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 /**
  * Every root object in an object model used in a tests has to implement this
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/CastorTestCase.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/CastorTestCase.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/CastorTestCase.java	(working copy)
@@ -42,7 +42,7 @@
  *
  * $Id$
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 import java.io.File;
 import java.io.IOException;
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/CastorTestSuiteRunner.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/CastorTestSuiteRunner.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/CastorTestSuiteRunner.java	(working copy)
@@ -40,12 +40,13 @@
  *
  * Copyright 2001-2003 (C) Intalio, Inc. All Rights Reserved.
  *
- * $Id$
+ * $Id:CastorTestSuiteRunner.java 6775 2007-01-28 20:04:11Z ekuns $
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 import java.io.File;
 
+
 import junit.framework.Test;
 import junit.framework.TestCase;
 
@@ -55,7 +56,7 @@
  *
  * @author <a href="mailto:gignoux@kernelcenter.org">Sebastien Gignoux</a>
  * @author <a href="mailto:blandin@intalio.com">Arnaud Blandin</a>
- * @version $Revision$ $Date: 2005-12-31 08:08:19 -0700 (Sat, 31 Dec 2005) $
+ * @version $Revision:6775 $ $Date: 2005-12-31 08:08:19 -0700 (Sat, 31 Dec 2005) $
  */
 public class CastorTestSuiteRunner extends TestCase {
 
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/CompareHelper.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/CompareHelper.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/CompareHelper.java	(working copy)
@@ -42,7 +42,7 @@
  *
  * $Id$
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 import java.lang.reflect.Array;
 
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/CompilationException.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/CompilationException.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/CompilationException.java	(working copy)
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 import java.io.PrintStream;
 import java.io.PrintWriter;
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/Compiler.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/Compiler.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/Compiler.java	(working copy)
@@ -13,7 +13,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
+
 
 public interface Compiler {
     /**
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/CTFUtils.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/CTFUtils.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/CTFUtils.java	(working copy)
@@ -43,7 +43,7 @@
  * $Id$
  *
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 import java.io.StringReader;
 import java.util.HashMap;
@@ -49,7 +49,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.exolab.castor.tests.framework.xmldiff.XMLDiff;
+import org.castor.xmlctf.xmldiff.XMLDiff;
 import org.exolab.castor.xml.MarshalException;
 import org.exolab.castor.xml.Unmarshaller;
 import org.exolab.castor.xml.ValidationException;
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/FileServices.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/FileServices.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/FileServices.java	(working copy)
@@ -42,7 +42,7 @@
  *
  * $Id$
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 import java.io.File;
 import java.io.FileInputStream;
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/MarshallingFrameworkTestCase.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/MarshallingFrameworkTestCase.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/MarshallingFrameworkTestCase.java	(working copy)
@@ -42,7 +42,7 @@
  *
  * $Id$
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 import java.io.FileNotFoundException;
 import java.io.InputStream;
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/ObjectModelBuilder.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/ObjectModelBuilder.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/ObjectModelBuilder.java	(working copy)
@@ -42,7 +42,7 @@
  *
  * $Id$
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 /**
  * Encapsulates the hard-coded generation of an instance of an object model. It
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/OnlySourceGenerationTestCase.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/OnlySourceGenerationTestCase.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/OnlySourceGenerationTestCase.java	(working copy)
@@ -15,7 +15,7 @@
  *
  * $Id: OnlySourceGenerationTestCase.java 0000 2006-10-05 22:00:00Z ekuns $
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/RandomHelper.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/RandomHelper.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/RandomHelper.java	(working copy)
@@ -42,7 +42,7 @@
  *
  * $Id$
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 import java.math.BigDecimal;
 import java.util.ArrayList;
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/SchemaTestCase.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/SchemaTestCase.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/SchemaTestCase.java	(working copy)
@@ -51,7 +51,7 @@
  * 03/25/2002   Arnaud Blandin      Ported to CTF
  * 10/15/2003   Arnaud Blandin      Improved reporting
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 import java.io.File;
 import java.io.FileWriter;
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/SourceGeneratorTestCase.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/SourceGeneratorTestCase.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/SourceGeneratorTestCase.java	(working copy)
@@ -42,7 +42,7 @@
  *
  * $Id$
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/SunJavaCompiler.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/SunJavaCompiler.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/SunJavaCompiler.java	(working copy)
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 import java.io.File;
 import java.lang.reflect.Method;
@@ -21,6 +21,7 @@
 import java.util.HashSet;
 import java.util.List;
 
+
 /**
  * Compiles a directory tree, recursively. This class is built to use the Sun Javac
  * compiler contained in tools.jar. A IllegalStateException will be thrown if tools.jar
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/TestCaseAggregator.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/TestCaseAggregator.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/TestCaseAggregator.java	(working copy)
@@ -42,10 +42,11 @@
  *
  * $Id$
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 import java.io.File;
 
+
 import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/TestSourceGenerator.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/TestSourceGenerator.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/TestSourceGenerator.java	(working copy)
@@ -15,7 +15,7 @@
  *
  * $Id: TestSourceGenerator.java 0000 2006-10-25 00:00:00Z ekuns $
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 import java.io.File;
 import java.io.FileReader;
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/TestWithCustomTest.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/TestWithCustomTest.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/TestWithCustomTest.java	(working copy)
@@ -15,7 +15,7 @@
  *
  * $Id: TestWithCustomTest.java 0000 2006-10-19 22:00:00Z ekuns $
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 import java.util.Iterator;
 import java.util.List;
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/TestWithRandomObject.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/TestWithRandomObject.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/TestWithRandomObject.java	(working copy)
@@ -15,7 +15,7 @@
  *
  * $Id: TestWithRandomDocument.java 0000 2006-10-19 22:00:00Z ekuns $
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 import java.io.File;
 import java.io.FileWriter;
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/TestWithReferenceDocument.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/TestWithReferenceDocument.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/TestWithReferenceDocument.java	(working copy)
@@ -15,7 +15,7 @@
  *
  * $Id: TestWithReferenceDocument.java 0000 2006-10-19 22:00:00Z ekuns $
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 import java.io.File;
 import java.io.FileWriter;
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/Location.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/Location.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/Location.java	(working copy)
@@ -15,7 +15,7 @@
  *
  * $Id: Location.java 0000 2007-01-09 00:10:00-0600 ekuns $
  */
-package org.exolab.castor.tests.framework.xmldiff.xml;
+package org.castor.xmlctf.xmldiff.xml;
 
 import org.xml.sax.Locator;
 
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/Attribute.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/Attribute.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/Attribute.java	(working copy)
@@ -15,7 +15,8 @@
  *
  * $Id: Attribute.java 0000 2007-01-11 00:00:00Z ekuns $
  */
-package org.exolab.castor.tests.framework.xmldiff.xml.nodes;
+package org.castor.xmlctf.xmldiff.xml.nodes;
+
 
 /**
  * A class representing an Attribute XML node.
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/Element.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/Element.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/Element.java	(working copy)
@@ -15,7 +15,7 @@
  *
  * $Id: Element.java 0000 2007-01-11 00:00:00Z ekuns $
  */
-package org.exolab.castor.tests.framework.xmldiff.xml.nodes;
+package org.castor.xmlctf.xmldiff.xml.nodes;
 
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -20,7 +20,7 @@
 import java.util.Iterator;
 import java.util.LinkedList;
 
-import org.exolab.castor.tests.framework.xmldiff.xml.Location;
+import org.castor.xmlctf.xmldiff.xml.Location;
 
 /**
  * A representation of an Element XML node.
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/Namespace.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/Namespace.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/Namespace.java	(working copy)
@@ -15,7 +15,7 @@
  *
  * $Id: Namespace.java 0000 2007-01-11 00:00:00Z ekuns $
  */
-package org.exolab.castor.tests.framework.xmldiff.xml.nodes;
+package org.castor.xmlctf.xmldiff.xml.nodes;
 
 /**
  * A class representing a Namespace for an Element.  Objects of this type
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/ParentNode.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/ParentNode.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/ParentNode.java	(working copy)
@@ -15,7 +15,7 @@
  *
  * $Id: ParentNode.java 0000 2007-01-11 00:00:00Z ekuns $
  */
-package org.exolab.castor.tests.framework.xmldiff.xml.nodes;
+package org.castor.xmlctf.xmldiff.xml.nodes;
 
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -20,6 +20,7 @@
 import java.util.Iterator;
 import java.util.LinkedList;
 
+
 /**
  * The base object for both Element and RootNode.  The children of a ParentNode
  * can be any type of XMLNode.
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/ProcessingInstruction.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/ProcessingInstruction.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/ProcessingInstruction.java	(working copy)
@@ -15,7 +15,8 @@
  *
  * $Id: ProcessingInstruction.java 0000 2007-01-11 00:00:00Z ekuns $
  */
-package org.exolab.castor.tests.framework.xmldiff.xml.nodes;
+package org.castor.xmlctf.xmldiff.xml.nodes;
+
 
 /**
  * A class representing an XML Processing Instruction.
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/Root.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/Root.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/Root.java	(working copy)
@@ -15,7 +15,8 @@
  *
  * $Id: Root.java 0000 2007-01-11 00:00:00Z ekuns $
  */
-package org.exolab.castor.tests.framework.xmldiff.xml.nodes;
+package org.castor.xmlctf.xmldiff.xml.nodes;
+
 
 /**
  * A representation of a Root node.
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/Text.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/Text.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/Text.java	(working copy)
@@ -15,7 +15,8 @@
  *
  * $Id: Text.java 0000 2007-01-11 00:00:00Z ekuns $
  */
-package org.exolab.castor.tests.framework.xmldiff.xml.nodes;
+package org.castor.xmlctf.xmldiff.xml.nodes;
+
 
 /**
  * A class representing an XML Text node.
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/XMLNode.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/XMLNode.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/nodes/XMLNode.java	(working copy)
@@ -15,11 +15,11 @@
  *
  * $Id: Element.java 0000 2007-01-11 00:00:00Z ekuns $
  */
-package org.exolab.castor.tests.framework.xmldiff.xml.nodes;
+package org.castor.xmlctf.xmldiff.xml.nodes;
 
 import java.util.Iterator;
 
-import org.exolab.castor.tests.framework.xmldiff.xml.Location;
+import org.castor.xmlctf.xmldiff.xml.Location;
 
 /**
  * The base node for all XMLNode types.
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/XMLContentHandler.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/XMLContentHandler.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/XMLContentHandler.java	(working copy)
@@ -15,7 +15,7 @@
  *
  * $Id: XMLBuilder.java 0000 2007-01-11 00:00:00Z ekuns $
  */
-package org.exolab.castor.tests.framework.xmldiff.xml;
+package org.castor.xmlctf.xmldiff.xml;
 
 import java.util.HashMap;
 import java.util.Iterator;
@@ -22,13 +22,13 @@
 import java.util.Map;
 import java.util.Stack;
 
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.Attribute;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.Element;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.Namespace;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.ParentNode;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.ProcessingInstruction;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.Root;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.Text;
+import org.castor.xmlctf.xmldiff.xml.nodes.Attribute;
+import org.castor.xmlctf.xmldiff.xml.nodes.Element;
+import org.castor.xmlctf.xmldiff.xml.nodes.Namespace;
+import org.castor.xmlctf.xmldiff.xml.nodes.ParentNode;
+import org.castor.xmlctf.xmldiff.xml.nodes.ProcessingInstruction;
+import org.castor.xmlctf.xmldiff.xml.nodes.Root;
+import org.castor.xmlctf.xmldiff.xml.nodes.Text;
 import org.xml.sax.Attributes;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.Locator;
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/XMLFileReader.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/XMLFileReader.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/xml/XMLFileReader.java	(working copy)
@@ -15,7 +15,7 @@
  *
  * $Id: XMLReader.java 0000 2007-01-11 00:00:00Z ekuns $
  */
-package org.exolab.castor.tests.framework.xmldiff.xml;
+package org.castor.xmlctf.xmldiff.xml;
 
 import java.io.File;
 import java.io.FileReader;
@@ -21,8 +21,8 @@
 import java.io.FileReader;
 import java.net.MalformedURLException;
 
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.XMLNode;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.Root;
+import org.castor.xmlctf.xmldiff.xml.nodes.Root;
+import org.castor.xmlctf.xmldiff.xml.nodes.XMLNode;
 import org.exolab.castor.util.NestedIOException;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
@@ -35,7 +35,7 @@
  *
  * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a>
  * @version $Revision: 0000 $ $Date: 2007-01-11 00:00:00 -0600 (Thu, 11 Jan 2007) $
- * @see org.exolab.castor.tests.framework.xmldiff.XMLDiff
+ * @see org.castor.xmlctf.xmldiff.XMLDiff
  * @since Castor 1.1
  */
 public class XMLFileReader {
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/XMLDiff.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/XMLDiff.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/xmldiff/XMLDiff.java	(working copy)
@@ -15,7 +15,7 @@
  *
  * $Id: XMLDiff.java 0000 2007-01-11 00:00:00Z ekuns $
  */
-package org.exolab.castor.tests.framework.xmldiff;
+package org.castor.xmlctf.xmldiff;
 
 import java.io.PrintWriter;
 import java.util.Iterator;
@@ -23,12 +23,12 @@
 import java.util.List;
 import java.util.StringTokenizer;
 
-import org.exolab.castor.tests.framework.xmldiff.xml.XMLFileReader;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.Attribute;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.Element;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.ParentNode;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.Root;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.XMLNode;
+import org.castor.xmlctf.xmldiff.xml.XMLFileReader;
+import org.castor.xmlctf.xmldiff.xml.nodes.Attribute;
+import org.castor.xmlctf.xmldiff.xml.nodes.Element;
+import org.castor.xmlctf.xmldiff.xml.nodes.ParentNode;
+import org.castor.xmlctf.xmldiff.xml.nodes.Root;
+import org.castor.xmlctf.xmldiff.xml.nodes.XMLNode;
 
 /**
  * A utility class used to compare two XMLNodes, or XML input files and report
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/XMLTestCase.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/XMLTestCase.java	(revision 0)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/castor/xmlctf/XMLTestCase.java	(working copy)
@@ -42,7 +42,7 @@
  *
  * $Id$
  */
-package org.exolab.castor.tests.framework;
+package org.castor.xmlctf;
 
 import java.io.File;
 import java.io.FileInputStream;
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/AntJavaCompiler.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/AntJavaCompiler.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/AntJavaCompiler.java	(working copy)
@@ -1,136 +0,0 @@
-/*
- * Copyright 2005 Edward Kuns
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.exolab.castor.tests.framework;
-
-import java.io.File;
-import java.util.HashSet;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.taskdefs.Javac;
-import org.apache.tools.ant.types.Path;
-
-/**
- * Compiles a directory tree, recursively. This class is built around the use of
- * the ANT JAVAC task.
- */
-public class AntJavaCompiler implements Compiler {
-    private static final HashSet IGNORE_DIRS = new HashSet();
-
-    static {
-        IGNORE_DIRS.add(FileServices.CVS);
-        IGNORE_DIRS.add(FileServices.SVN);
-        IGNORE_DIRS.add("org");
-        IGNORE_DIRS.add("com");
-        IGNORE_DIRS.add("net");
-    }
-
-    private final File  _baseDirectory;
-    private final File  _outputDirectory;
-
-    private String _javaVersion = null;
-    private Javac _compiler;
-
-    /**
-     * Creates a compiler for a given directory.
-     *
-     * @param baseDirectory The directory that holds the files to be compiled.
-     */
-    public AntJavaCompiler(final File baseDirectory) {
-        if (baseDirectory == null) {
-            throw new IllegalArgumentException("'baseDirectory' must not be null.");
-        }
-        _baseDirectory = baseDirectory;
-        _outputDirectory = baseDirectory;
-    }
-
-    public void setJavaSourceVersion(float javaSourceVersion) {
-        if (javaSourceVersion >= 5F && javaSourceVersion < 10F) {
-            javaSourceVersion = 1.0F + (javaSourceVersion / 10F);
-        }
-        _javaVersion = "" + javaSourceVersion;
-    }
-
-    /**
-     * Compiles the content of a directory. Throws a <code>CompilationException</code>
-     * if the build fails.
-     */
-    public void compileDirectory() {
-        _compiler = makeCompiler(_baseDirectory, _outputDirectory);
-        compileDirectory(_baseDirectory, _outputDirectory);
-    }
-
-    /**
-     * Creates and returns a Ant Javac compiler.
-     *
-     * @return Ant Javac compiler
-     */
-    private Javac makeCompiler(final File srcDir, final File destDir) {
-        Project project = new Project();
-        project.init();
-        project.setBasedir(srcDir.getAbsolutePath());
-
-        Javac compiler = new Javac();
-        compiler.setProject(project);
-        compiler.setDestdir(destDir.getAbsoluteFile());
-        compiler.setOptimize(false);
-        compiler.setDebug(true);
-        compiler.setDebugLevel("lines,vars,source");
-        compiler.setIncludejavaruntime(true);
-        if (XMLTestCase._verbose) {
-            compiler.setListfiles(true);
-            compiler.setVerbose(true);
-        } else {
-            compiler.setNowarn(true);
-        }
-        if (_javaVersion != null) {
-            compiler.setSource(_javaVersion);
-        }
-        Path classpath = compiler.createClasspath();
-        classpath.setPath(System.getProperty("java.class.path"));
-        classpath.add(new Path(project, destDir.getAbsolutePath()));
-        compiler.setClasspath(classpath);
-        return compiler;
-    }
-
-    /**
-     * Compiles a directory tree. Throws a <code>CompilationException</code> if build
-     * fails.
-     *
-     * @param srcDir Source directory holding the files to be compiled.
-     * @param destDir Destination directory to put the compiled classes in.
-     */
-    private void compileDirectory(final File srcDir, final File destDir) {
-        File[] entries = srcDir.listFiles();
-        for (int i = 0; i < entries.length; i++) {
-            File entry = entries[i];
-            if (entry.isDirectory() && !IGNORE_DIRS.contains(entry.getName())) {
-                compileDirectory(entry, destDir);
-            }
-        }
-        entries = null;
-
-        try {
-            Path srcPath = _compiler.createSrc();
-            srcPath.setLocation(destDir);
-            _compiler.setSrcdir(srcPath);
-            _compiler.execute();
-        } catch (BuildException ex) {
-            throw new CompilationException("Problem compiling directory " + srcDir, ex);
-        }
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/CastorTestable.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/CastorTestable.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/CastorTestable.java	(working copy)
@@ -1,81 +0,0 @@
-/*
- * Redistribution and use of this software and associated documentation
- * ("Software"), with or without modification, are permitted provided
- * that the following conditions are met:
- *
- * 1. Redistributions of source code must retain copyright
- *    statements and notices.  Redistributions must also contain a
- *    copy of this document.
- *
- * 2. Redistributions in binary form must reproduce the
- *    above copyright notice, this list of conditions and the
- *    following disclaimer in the documentation and/or other
- *    materials provided with the distribution.
- *
- * 3. The name "Exolab" must not be used to endorse or promote
- *    products derived from this Software without prior written
- *    permission of Intalio, Inc.  For written permission,
- *    please contact info@exolab.org.
- *
- * 4. Products derived from this Software may not be called "Exolab"
- *    nor may "Exolab" appear in their names without prior written
- *    permission of Intalio, Inc. Exolab is a registered
- *    trademark of Intalio, Inc.
- *
- * 5. Due credit should be given to the Exolab Project
- *    (http://www.exolab.org/).
- *
- * THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
- * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
- * INTALIO, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Copyright 1999 (C) Intalio, Inc. All Rights Reserved.
- *
- * $Id$
- */
-package org.exolab.castor.tests.framework;
-
-/**
- * Every root object in an object model used in a tests has to implement this
- * interface as well as to override the equals() method. It can be useful that
- * all the objects in an object model used for tests implement this interface.
- *
- * @author <a href="mailto:gignoux@intalio.com">Sebastien Gignoux</a>
- * @version $Revision$ $Date: 2003-10-15 09:17:49 -0600 (Wed, 15 Oct 2003) $
- */
-public interface CastorTestable {
-
-    /**
-     * Returns a recursive dump of the contents of the object's fields in a user
-     * readable format. This is used to retrieve the state of the object if
-     * castor fails to marshal the object for any reason.
-     * <p>
-     * We don't rely on the {@link java.lang.Object#toString()} function as
-     * might be implemented with another semantic.
-     *
-     * @return a recursive dump of the contents of the object's fields in a user
-     *         readable format.
-     */
-    public String dumpFields();
-
-    /**
-     * Randomizes the contents of the fields of this instance. This is used to
-     * create an instance of the object model whithout having to unmarshal
-     * anything.
-     *
-     * @throws InstantiationException if this method is called for an Interface
-     *             or abstract class
-     * @throws IllegalAccessException if this method is not accessible
-     */
-    public void randomizeFields() throws InstantiationException, IllegalAccessException;
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/CastorTestCase.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/CastorTestCase.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/CastorTestCase.java	(working copy)
@@ -1,434 +0,0 @@
-/*
- * Redistribution and use of this software and associated documentation
- * ("Software"), with or without modification, are permitted provided
- * that the following conditions are met:
- *
- * 1. Redistributions of source code must retain copyright
- *    statements and notices.  Redistributions must also contain a
- *    copy of this document.
- *
- * 2. Redistributions in binary form must reproduce the
- *    above copyright notice, this list of conditions and the
- *    following disclaimer in the documentation and/or other
- *    materials provided with the distribution.
- *
- * 3. The name "Exolab" must not be used to endorse or promote
- *    products derived from this Software without prior written
- *    permission of Intalio, Inc.  For written permission,
- *    please contact info@exolab.org.
- *
- * 4. Products derived from this Software may not be called "Exolab"
- *    nor may "Exolab" appear in their names without prior written
- *    permission of Intalio, Inc. Exolab is a registered
- *    trademark of Intalio, Inc.
- *
- * 5. Due credit should be given to the Exolab Project
- *    (http://www.exolab.org/).
- *
- * THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
- * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
- * INTALIO, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Copyright 2002-2003 (C) Intalio, Inc. All Rights Reserved.
- *
- * $Id$
- */
-package org.exolab.castor.tests.framework;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.jar.JarFile;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.exolab.castor.tests.framework.testDescriptor.MarshallingTest;
-import org.exolab.castor.tests.framework.testDescriptor.OnlySourceGenerationTest;
-import org.exolab.castor.tests.framework.testDescriptor.SchemaTest;
-import org.exolab.castor.tests.framework.testDescriptor.SourceGeneratorTest;
-import org.exolab.castor.tests.framework.testDescriptor.TestDescriptor;
-import org.exolab.castor.tests.framework.testDescriptor.TestDescriptorChoice;
-import org.exolab.castor.tests.framework.testDescriptor.UnitTestCase;
-import org.exolab.castor.xml.MarshalException;
-import org.exolab.castor.xml.ValidationException;
-
-/**
- * Abstracts a test case in the CTF (Castor Test Framework). A CTF test case can
- * be driven by a directory or by a JAR file.
- *
- * @author <a href="mailto:blandin@intalio.com">Arnaud Blandin</a>
- * @version $Revision$ $Date: 2004-03-08 17:23:25 -0700 (Mon, 08 Mar 2004) $
- */
-public class CastorTestCase extends TestCase {
-
-    /** An unknown type of Castor test case. */
-    public static final short UNKNOWN   = -1;
-    /** A directory-based Castor test case. */
-    public static final short DIRECTORY = 0;
-    /** A JAR-based Castor test case. */
-    public static final short JAR       = 1;
-
-    /** Name of the resource for the test descriptor XML document. */
-    public static final String TEST_DESCRIPTOR = "TestDescriptor.xml";
-    /** Name of the resource for the test descriptor XML document if a JAR file is used. */
-    private static final String TEST_DESCRIPTOR_JAR = "META-INF/TestDescriptor.xml";
-    /** File separator for this system. */
-    private static final String FILE_SEPARATOR = System.getProperty("file.separator");
-    /** Java version of the JVM we are running in. */
-    private static final float JAVA_VERSION = Float.parseFloat(System.getProperty("java.specification.version"));
-    /** True if we desire a lot of information on what is happening during the test. */
-    private static final boolean _verbose;
-
-    static {
-        String v = System.getProperty(TestCaseAggregator.VERBOSE_PROPERTY);
-        _verbose = (v != null && v.equals("true"));
-        v = null;
-    }
-
-    /**
-     * True if we dump the stack trace that is generated from any validation
-     * exception or marshal exception caused by reading the XML Test
-     * Description.
-     */
-    private static boolean _printStack;
-
-    static {
-        String v = System.getProperty(TestCaseAggregator.PRINT_STACK_TRACE);
-        _printStack = (v != null && v.equals("true"));
-        v = null;
-    }
-
-    /** Indicates whether or not the output root directory has been compiled. */
-    private boolean _compiled = false;
-    /** Class loader to use for the jar. */
-    private ClassLoader _loader;
-    /** The test descriptor from the jar. */
-    private TestDescriptor _testDescriptor;
-    /** The file that contains the tests. This can either be a directory or a jar file. */
-    private final File _testFile;
-    /** The Type of the test (directory or jar). */
-    private final short _type;
-    /** Place where the temporary files and other output are created. */
-    private final File _outputRootFile;
-    /** String containing the directory path from the test root to here. */
-    private final String _directoryToHere;
-
-    /**
-     * Constructs a CTF test case given only a test case name
-     * @param name the name of the test case
-     */
-    public CastorTestCase(final String name) {
-        super(name);
-        _testFile        = null;
-        _outputRootFile  = null;
-        _directoryToHere = "";
-        _type            = UNKNOWN;
-    }
-
-    /**
-     * Constructs a CTF test case given a File (either a JAR file or a
-     * directory) and a directory where temporary files will be placed. The test
-     * case name will be derived from the file (JAR or directory) name.
-     *
-     * @param file Either a directory containing TestDescriptor.xml or a JAR
-     *            file containing META-INF/TestDescriptor.xml
-     * @param directoryToHere directory path leading to the current test.
-     * @param outputRoot Directory where temporary files and output will go.
-     */
-    public CastorTestCase(final File file, final String directoryToHere, final String outputRoot) {
-        super(directoryToHere);
-        _directoryToHere = directoryToHere;
-
-        if (file.isDirectory()) {
-            _type = DIRECTORY;
-            _outputRootFile = new File(outputRoot + FILE_SEPARATOR);
-        } else {
-            _type = JAR;
-            try {
-                new JarFile(file);
-                String fileName = file.getName();
-                fileName = fileName.substring(0, fileName.lastIndexOf("."));
-                _outputRootFile = new File(outputRoot + FILE_SEPARATOR + fileName);
-            } catch (java.util.zip.ZipException e) {
-                throw new IllegalStateException(file.getAbsolutePath()+" is not a valid JAR file.");
-            } catch (java.io.IOException ie) {
-                throw new IllegalStateException(file.getAbsolutePath()+" is not a valid JAR file.");
-            }
-        }
-
-        // Append to our current class loader the directory or JAR containing our test case
-        try {
-            URL[] urlList = {file.toURL()};
-            _loader =  new URLClassLoader(urlList, this.getClass().getClassLoader());
-        } catch (MalformedURLException urle) {
-             //should never happen--> failure before
-             urle.printStackTrace();
-        }
-        _testFile = file;
-        _outputRootFile.mkdirs();
-    }
-
-    public ClassLoader getClassLoader() {
-        return _loader;
-    }
-
-    public File getTestFile() {
-        return _testFile;
-    }
-
-    public short getType() {
-        return _type;
-    }
-
-    public String getDirectoryToHere() {
-        return _directoryToHere;
-    }
-
-    public File getOutputRootFile() {
-        return _outputRootFile;
-    }
-
-    /**
-     * Returns a boolean that when true indicates the output directory has been
-     * compiled. This is useful for preventing the compilation of a directory
-     * multiple times when more than one test case exists in a given directory.
-     *
-     * @return true when the output root directory has already been compiled.
-     */
-    public boolean isDirectoryCompiled() {
-        return _compiled;
-    } //-- isDirectoryCompiled
-
-
-   /**
-     * Sets the ClassLoader to use for loading the resources for this test case.
-     *
-     * @param loader the class loader to use
-     */
-    public void setClassLoader(final ClassLoader loader) {
-        _loader = loader;
-    }
-
-    /**
-     * Sets a flag to indicate the output directory has been compiled. This
-     * prevents compiling a directory multiple times unnecessarily when more
-     * than one test case exists in a given directory.
-     *
-     * @param compiled true if the output directory for this test case has been
-     *            compiled
-     */
-    public void setDirectoryCompiled(final boolean compiled) {
-        _compiled = compiled;
-    } //-- setDirectoryCompiled
-
-    /**
-     * Assembles and returns a test suite containing all known tests.
-     *
-     * New tests should be added here!
-     *
-     * @return A non-null test suite if we can load the test descriptor
-     */
-    public Test suite() {
-        final InputStream descriptor;
-        if (_type == JAR) {
-            descriptor = _loader.getResourceAsStream(TEST_DESCRIPTOR_JAR);
-        } else {
-            descriptor = _loader.getResourceAsStream(TEST_DESCRIPTOR);
-        }
-
-        if (descriptor == null) {
-            verbose("test '" + _testFile.getName() + "' has no TestDescriptor.xml");
-            return null;
-        }
-
-        try {
-            _testDescriptor = TestDescriptor.unmarshal(new InputStreamReader(descriptor));
-        } catch (ValidationException ve) {
-            verbose("Error reading: " + _testFile.getAbsolutePath());
-            verbose("-> " + ve.toString());
-            if (_printStack) {
-                ve.printStackTrace(System.out);
-            }
-            fail(ve.toString());
-        } catch (MarshalException me) {
-            verbose("Error reading: " + _testFile.getAbsolutePath());
-            verbose("-> " + me.toString());
-            if (_printStack) {
-                me.printStackTrace(System.out);
-            }
-            fail(me.toString());
-        } finally {
-            try {
-                descriptor.close();
-            } catch (IOException e) {
-                // ignore
-            }
-        }
-
-        if (_testDescriptor.hasMinimumJavaVersion()) {
-            // Get minimum Java version & convert to our Canonical form
-            float minVersion = _testDescriptor.getMinimumJavaVersion();
-            if (minVersion > 5F && minVersion < 10F) {
-                minVersion = 1.0F + (minVersion / 10F);
-            }
-            if (minVersion > JAVA_VERSION) {
-                verbose("-->Test requires Java " + minVersion + " but we are running Java " + JAVA_VERSION);
-                verbose("-->Skipping the test");
-                return null;
-            }
-        }
-
-        final String suiteName = _directoryToHere + _testDescriptor.getName();
-        final TestSuite suite = new TestSuite(suiteName);
-        verbose("Creating '" + suiteName + "' test suite");
-
-        TestDescriptorChoice choice = _testDescriptor.getTestDescriptorChoice();
-        MarshallingTest marshallingTests      = choice.getMarshallingTest();
-        SourceGeneratorTest sourceGenTests    = choice.getSourceGeneratorTest();
-        SchemaTest schemaTests                = choice.getSchemaTest();
-        OnlySourceGenerationTest genOnlyTests = choice.getOnlySourceGenerationTest();
-
-        if (marshallingTests != null) {
-            setUpMarshallingTests(suiteName, suite, marshallingTests);
-        }
-        if (sourceGenTests != null) {
-            setUpSourceGeneratorTests(suiteName, suite, sourceGenTests);
-        }
-        if (schemaTests != null) {
-            setUpSchemaTests(suiteName, suite, schemaTests);
-        }
-        if (genOnlyTests != null) {
-            setUpGenerationOnlyTests(suiteName, suite, genOnlyTests);
-        }
-
-        return suite;
-    }
-
-    /**
-     * Loops over all Marshalling tests from our TestDescriptor.xml, configures
-     * each test and adds it to our suite.
-     *
-     * @param suiteName Test Suite name
-     * @param suite the Test Suite to add all unit tests to
-     * @param mar a collection of Marshalling Unit Tests
-     */
-    private void setUpMarshallingTests(final String suiteName, final TestSuite suite,
-                                       final MarshallingTest mar) {
-        for (int i = 0; i < mar.getUnitTestCaseCount(); ++i) {
-            UnitTestCase tc = mar.getUnitTestCase(i);
-            MarshallingFrameworkTestCase mftc = new MarshallingFrameworkTestCase(this, tc, mar);
-            mftc._configuration = mar.getConfiguration();
-            mftc.setTestSuiteName(suiteName);
-            suite.addTest(mftc.suite());
-        }
-    }
-
-    /**
-     * Loops over all Source Generation tests from our TestDescriptor.xml,
-     * configures each test and adds it to our suite.
-     *
-     * @param suiteName Test Suite name
-     * @param suite the Test Suite to add all unit tests to
-     * @param sg a collection of Source Generation Unit Tests
-     */
-    private void setUpSourceGeneratorTests(final String suiteName, final TestSuite suite,
-                                           final SourceGeneratorTest sg) {
-        for (int i = 0; i < sg.getUnitTestCaseCount(); ++i) {
-            UnitTestCase tc = sg.getUnitTestCase(i);
-            SourceGeneratorTestCase sgtc = new SourceGeneratorTestCase(this, tc, sg);
-            sgtc.setTestSuiteName(suiteName);
-            suite.addTest(sgtc.suite());
-        }
-    }
-
-    /**
-     * Loops over all Schema tests from our TestDescriptor.xml, configures each
-     * test and adds it to our suite.
-     *
-     * @param suiteName Test Suite name
-     * @param suite the Test Suite to add all unit tests to
-     * @param schemaTest a collection of Schema Unit Tests
-     */
-    private void setUpSchemaTests(final String suiteName, final TestSuite suite,
-                                  final SchemaTest schemaTest) {
-        for (int i = 0 ; i < schemaTest.getUnitTestCaseCount(); i++) {
-            UnitTestCase tc = schemaTest.getUnitTestCase(i);
-            // Little trick: getUnitTestCaseChoice should not be null at this point
-            String name = tc.getUnitTestCaseChoice().getSchema();
-            if (name.equals("*")) {
-                File[] list = _testFile.listFiles();
-                for (int j = 0; j < list.length; ++j) {
-                    String fileName = list[j].getName();
-                    // FIXME:  It would be better to use a file filter and to make
-                    // sure our SchemaReader can read this file
-                    if (fileName.endsWith(FileServices.XSD)) {
-                        makeIndividualSchemaTest(suiteName, suite, tc, fileName);
-                    }
-                }
-            } else {
-                makeIndividualSchemaTest(suiteName, suite, tc, name);
-            }
-        }
-    }
-
-    /**
-     * Loops over all Only-Source-Generation tests from our TestDescriptor.xml,
-     * configures each test and adds it to our suite.
-     *
-     * @param suiteName Test Suite name
-     * @param suite the Test Suite to add all unit tests to
-     * @param sg a collection of Source Generation Unit Tests
-     */
-    private void setUpGenerationOnlyTests(final String suiteName, final TestSuite suite,
-                                          final OnlySourceGenerationTest sg) {
-        for (int i = 0; i < sg.getUnitTestCaseCount(); ++i) {
-            UnitTestCase tc = sg.getUnitTestCase(i);
-            OnlySourceGenerationTestCase sgtc = new OnlySourceGenerationTestCase(this, tc, sg);
-            sgtc.setTestSuiteName(suiteName);
-            suite.addTest(sgtc.suite());
-        }
-    }
-
-    /**
-     * Makes an individual Schema test and adds it to our Test Suite.
-     *
-     * @param suiteName Test Suite name
-     * @param suite the Test Suite to add all unit tests to
-     * @param tc our Test Case
-     * @param name Schema name
-     */
-    private void makeIndividualSchemaTest(final String suiteName, final TestSuite suite,
-                                          final UnitTestCase tc, final String name) {
-        tc.setName(suiteName + '#' + name);
-        SchemaTestCase stc = new SchemaTestCase(this, tc);
-        stc.setSchemaName(name);
-        suite.addTest(stc);
-    }
-
-    /**
-     * Prints the provided message if verbose is true.
-     *
-     * @param message The message to display if verbose is true.
-     */
-    private void verbose(final String message) {
-        if (_verbose) {
-            System.out.println(message);
-        }
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/CastorTestSuiteRunner.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/CastorTestSuiteRunner.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/CastorTestSuiteRunner.java	(working copy)
@@ -1,239 +0,0 @@
-/*
- * Redistribution and use of this software and associated documentation
- * ("Software"), with or without modification, are permitted provided
- * that the following conditions are met:
- *
- * 1. Redistributions of source code must retain copyright
- *    statements and notices.  Redistributions must also contain a
- *    copy of this document.
- *
- * 2. Redistributions in binary form must reproduce the
- *    above copyright notice, this list of conditions and the
- *    following disclaimer in the documentation and/or other
- *    materials provided with the distribution.
- *
- * 3. The name "Exolab" must not be used to endorse or promote
- *    products derived from this Software without prior written
- *    permission of Intalio, Inc.  For written permission,
- *    please contact info@exolab.org.
- *
- * 4. Products derived from this Software may not be called "Exolab"
- *    nor may "Exolab" appear in their names without prior written
- *    permission of Intalio, Inc. Exolab is a registered
- *    trademark of Intalio, Inc.
- *
- * 5. Due credit should be given to the Exolab Project
- *    (http://www.exolab.org/).
- *
- * THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
- * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
- * INTALIO, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Copyright 2001-2003 (C) Intalio, Inc. All Rights Reserved.
- *
- * $Id$
- */
-package org.exolab.castor.tests.framework;
-
-import java.io.File;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-/**
- * Start tests for the Castor Testing Framework. This is the main class for the
- * Castor Testing Framework. It is all driven from here.
- *
- * @author <a href="mailto:gignoux@kernelcenter.org">Sebastien Gignoux</a>
- * @author <a href="mailto:blandin@intalio.com">Arnaud Blandin</a>
- * @version $Revision$ $Date: 2005-12-31 08:08:19 -0700 (Sat, 31 Dec 2005) $
- */
-public class CastorTestSuiteRunner extends TestCase {
-
-    /**
-     * The root directory of the place where all the files generated by the
-     * different tests have to be put.
-     */
-    public static final String TEST_OUTPUT_ROOT = "../xmlctf/build/tests/output/";
-
-    /**
-     * Name of the system property storing the root directory of all test cases.
-     * @see #TEST_ROOT
-     */
-    private static final String TEST_ROOT_PROPERTY = "org.exolab.castor.tests.TestRoot";
-
-    /**
-     * Root directory of all test cases we will process. We look for test cases
-     * recursively starting in this directory.
-     */
-    private static String TEST_ROOT;
-
-    /**
-     * Command line argument that causes the help/options to be displayed.
-     */
-    private static final String HELP_ARG = "-help";
-
-    /**
-     * Command line argument that sets verbose mode true.
-     */
-    private static final String VERBOSE_ARG = "-verbose";
-
-    /**
-     * Command line argument that sets text mode true (no GUI).
-     */
-    private static final String TEXT_MODE_ARG = "-text";
-
-    /**
-     * Command line argument to print or not the stack trace
-     */
-    private static final String PRINT_STACK = "-printStack";
-
-    /**
-     * Command line argument specifying the seed for the pseudo-random number
-     * generator.
-     */
-    private static final String SEED_ARG = "-seed";
-
-    /**
-     * Default constructor that takes a name per test case
-     * @param name test case name
-     */
-    public CastorTestSuiteRunner(String name) {
-        super(name);
-    }
-
-    /**
-     * Starts a TestCaseAggregator to collect all the tests in the test root
-     * directory and its subdirectories.
-     *
-     * @return A non-null test suite.
-     */
-    public static Test suite() {
-        TEST_ROOT = System.getProperty(TEST_ROOT_PROPERTY);
-
-        if (TEST_ROOT.equals(".") || TEST_ROOT.equals("..")) {
-            //-- convert relative directories "." and ".." to a Canonical path
-            File tmp = new File(TEST_ROOT);
-            try {
-                TEST_ROOT = tmp.getCanonicalPath();
-            } catch (java.io.IOException iox) {
-                iox.printStackTrace();
-                System.exit(1);
-            }
-        } else if (TEST_ROOT.startsWith("./") || TEST_ROOT.startsWith(".\\")) {
-            //-- Remove leading ./ or .\ -- URLClassLoader can't handle such file URLs
-            TEST_ROOT = TEST_ROOT.substring(2);
-        }
-
-        File testRoot = new File(TEST_ROOT);
-
-        if (!testRoot.exists()) {
-            System.out.println("\nUnable to locate the root directory for the test cases");
-            System.exit(1);
-        }
-        return new TestCaseAggregator(testRoot, TEST_OUTPUT_ROOT).suite();
-    }
-
-    /**
-     * Runs the Castor Testing Framework
-     * @param args the standard command-line arguments
-     */
-    public static void main(String args[]) {
-        if (args.length == 0) {
-            error(); // Does not return
-        }
-
-        boolean text = processArguments(args);
-
-        if (System.getProperty(TEST_ROOT_PROPERTY) == null) {
-            error(); // Does not return
-        }
-
-        System.out.println("Pseudo-random number generator seed:  '" + RandomHelper.getSeed() + "'");
-
-        String[] testCaseName = {CastorTestSuiteRunner.class.getName()};
-
-        if (text) {
-            junit.textui.TestRunner.main(testCaseName);
-        } else {
-            junit.swingui.TestRunner.main(testCaseName);
-        }
-    }
-
-    /**
-     * Processes command-line arguments for main() and returns whether or not to
-     * use the text or GUI JUnit.
-     *
-     * @param args command-line arguments from main()
-     * @return true if JUnit should be run in text mode, not GUI
-     */
-    private static boolean processArguments(String[] args) {
-        boolean textModeJUnit = false; // GUI by default
-
-        for (int i=0; i<args.length; ++i) {
-            String argument = args[i];
-            System.out.println("arg: '" + argument + "'");
-
-            if (argument.equals(VERBOSE_ARG)) {
-                System.out.println("Verbose on");
-                System.setProperty(TestCaseAggregator.VERBOSE_PROPERTY, "true");
-            } else if (argument.equals(PRINT_STACK)) {
-                System.out.println("Printing stack traces on error on.");
-                System.setProperty(TestCaseAggregator.PRINT_STACK_TRACE, "true");
-            } else if (argument.equals(TEXT_MODE_ARG)) {
-                System.out.println("Running in text mode.");
-                textModeJUnit = true;
-            } else if (argument.equals(SEED_ARG)) {
-                // The next argument should be a number...
-                try {
-                    long seed = new Long(args[++i]).longValue();
-                    RandomHelper.setSeed(seed);
-                } catch (NumberFormatException nfe) {
-                    System.out.println("Unable to parse the number for the seed");
-                    error(); // Does not return
-                }
-            } else if (argument.equals(HELP_ARG)) {
-                usage();
-                System.exit(0);
-            } else if (System.getProperty(TEST_ROOT_PROPERTY) == null) {
-                System.setProperty(TEST_ROOT_PROPERTY, argument);
-            } else {
-                System.out.println("Unexpected command-line argument: '" + argument + "'");
-                error(); // Does not return
-            }
-        }
-        return textModeJUnit;
-    }
-
-    /**
-     * Print usage and exit with a non-zero return code
-     */
-    private static void error() {
-        usage();
-        System.exit(1);
-    }
-
-    /**
-     * Print usage
-     */
-    private static void usage() {
-        System.out.println("Castor Testing Framework ");
-        System.out.println("------------------------ ");
-        System.out.println("argument: [" + VERBOSE_ARG + "] [" + TEXT_MODE_ARG + "] [" + PRINT_STACK + "] [" + SEED_ARG + " <seed value>] <root test directory or a castor jar test file>");
-        System.out.println("   " + HELP_ARG + " : displays this screen.");
-        System.out.println("   " + VERBOSE_ARG + " : give detailed execution information for the each test");
-        System.out.println("   " + TEXT_MODE_ARG + " : run the test without starting the swing gui");
-        System.out.println("   " + PRINT_STACK + " : Print the full stack trace on the console when an exception is thrown");
-        System.out.println("   " + SEED_ARG  + " <seed value> : force the use of a given seed for the pseudo-random number generator used for the random tests");
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/CompareHelper.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/CompareHelper.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/CompareHelper.java	(working copy)
@@ -1,210 +0,0 @@
-/*
- * Redistribution and use of this software and associated documentation
- * ("Software"), with or without modification, are permitted provided
- * that the following conditions are met:
- *
- * 1. Redistributions of source code must retain copyright
- *    statements and notices.  Redistributions must also contain a
- *    copy of this document.
- *
- * 2. Redistributions in binary form must reproduce the
- *    above copyright notice, this list of conditions and the
- *    following disclaimer in the documentation and/or other
- *    materials provided with the distribution.
- *
- * 3. The name "Exolab" must not be used to endorse or promote
- *    products derived from this Software without prior written
- *    permission of Intalio, Inc.  For written permission,
- *    please contact info@exolab.org.
- *
- * 4. Products derived from this Software may not be called "Exolab"
- *    nor may "Exolab" appear in their names without prior written
- *    permission of Intalio, Inc. Exolab is a registered
- *    trademark of Intalio, Inc.
- *
- * 5. Due credit should be given to the Exolab Project
- *    (http://www.exolab.org/).
- *
- * THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
- * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
- * INTALIO, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Copyright 1999 (C) Intalio, Inc. All Rights Reserved.
- *
- * $Id$
- */
-package org.exolab.castor.tests.framework;
-
-import java.lang.reflect.Array;
-
-/**
- * Assists in the comparison of objects.  This method is used by generated
- * code but is not used within the CTF directly.
- *
- * @author <a href="mailto:gignoux@intalio.com">Sebastien Gignoux</a>
- * @version $Revision$ $Date: 2003-10-15 09:17:49 -0600 (Wed, 15 Oct 2003) $
- */
-public class CompareHelper {
-
-    /**
-     * Compare two objects. Return true if they are both null or if they are
-     * equal. This comparison method has special handling for arrays: For
-     * arrays, each element is compared.
-     * <p>
-     * Warning: We will throw a NullPointerException if any element of either
-     * array is null.
-     *
-     * @param o1 first object
-     * @param o2 second object
-     * @return true if both objects are both null or otherwise are equal
-     */
-    public static boolean equals(Object o1, Object o2) {
-        if (o1 == null && o2 == null) {
-            return true;
-        }
-
-        if ((o1 != null && o2 == null) || (o1 == null && o2 != null)) {
-            return false;
-        }
-
-        // From now we can safely assume (o1 != null && o2 != null)
-
-        if (! o1.getClass().equals(o2.getClass())) {
-            return false;
-        }
-
-        if (o1.getClass().isArray()) {
-            return compareArray(o1, o2);
-        }
-
-        return o1.equals(o2);
-    }
-
-    /**
-     * Compares two arrays, returning true if the arrays contain the same
-     * values.
-     * <p>
-     * Warning: We will throw a NullPointerException if any element of either
-     * array is null.
-     *
-     * @param o1 The first array
-     * @param o2 The second array
-     * @return true if the two objects represent arrays with the same values
-     */
-    private static boolean compareArray(Object o1, Object o2) {
-        int size = Array.getLength(o1);
-
-        if (size != Array.getLength(o2))
-            return false;
-
-        Class component = o1.getClass().getComponentType();
-
-        if ( ! component.equals(o2.getClass().getComponentType()))
-            return false;
-
-        if (component.isPrimitive()) {
-            return comparePrimitiveArray(o1, o2);
-        }
-
-        for (int i=0; i < size; ++i) {
-            if (! Array.get(o1, i).equals(Array.get(o2, i))) {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    /**
-     * Compares two arrays of primitive values. The caller should have tested
-     * that the two array have the same length and that the component type are
-     * equal.
-     *
-     * @param o1 The first array
-     * @param o2 The second array
-     * @return true if the two objects represent arrays of the same primitive
-     *         values
-     */
-    public static boolean comparePrimitiveArray(Object o1, Object o2) {
-        Class component = o1.getClass().getComponentType();
-        int size = Array.getLength(o1);
-
-        if (component.equals(Boolean.TYPE)) {
-            for (int i=0; i<size; ++i) {
-                if (Array.getBoolean(o1, i) != Array.getBoolean(o2, i)) {
-                    return false;
-                }
-            }
-
-            return true;
-        } else if (component.equals(Byte.TYPE)) {
-            for (int i=0; i<size; ++i) {
-                if (Array.getByte(o1, i) != Array.getByte(o2, i)) {
-                    return false;
-                }
-            }
-
-            return true;
-        } else if (component.equals(Character.TYPE)) {
-            for (int i=0; i<size; ++i) {
-                if (Array.getChar(o1, i) != Array.getChar(o2, i)) {
-                    return false;
-                }
-            }
-
-            return true;
-        } else if (component.equals(Double.TYPE)) {
-            for (int i=0; i<size; ++i) {
-                if (Array.getDouble(o1, i) != Array.getDouble(o2, i)) {
-                    return false;
-                }
-            }
-
-            return true;
-        } else if (component.equals(Float.TYPE)) {
-            for (int i=0; i<size; ++i) {
-                if (Array.getFloat(o1, i) != Array.getFloat(o2, i)) {
-                    return false;
-                }
-            }
-
-            return true;
-        } else if (component.equals(Integer.TYPE)) {
-            for (int i=0; i<size; ++i) {
-                if (Array.getInt(o1, i) != Array.getInt(o2, i)) {
-                    return false;
-                }
-            }
-
-            return true;
-        } else if (component.equals(Long.TYPE)) {
-            for (int i=0; i<size; ++i) {
-                if (Array.getLong(o1, i) != Array.getLong(o2, i)) {
-                    return false;
-                }
-            }
-
-            return true;
-        } else if (component.equals(Short.TYPE)) {
-            for (int i=0; i<size; ++i) {
-                if (Array.getShort(o1, i) != Array.getShort(o2, i)) {
-                    return false;
-                }
-            }
-
-            return true;
-        } else {
-            throw new IllegalArgumentException("Unexpected primitive type " + component.toString());
-        }
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/CompilationException.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/CompilationException.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/CompilationException.java	(working copy)
@@ -1,117 +0,0 @@
-/*
- * Copyright 2005 Werner Guttmann
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.exolab.castor.tests.framework;
-
-import java.io.PrintStream;
-import java.io.PrintWriter;
-
-/**
- * Exception that signals a compilation error.
- */
-public class CompilationException extends RuntimeException {
-    /** SerialVersionUID */
-    private static final long serialVersionUID = -1459631801932567828L;
-
-    /** The cause for this exception. */
-    private Throwable _cause;
-
-    /**
-     * Creates an instance of this exception type.
-     */
-    public CompilationException() {
-        super();
-    }
-
-    /**
-     * Creates an instance of this exception type.
-     * @param message The error message
-     * @param cause The root cause
-     */
-    public CompilationException(final String message, final Throwable cause) {
-        super(message);
-        _cause = cause;
-    }
-
-    /**
-     * Creates an instance of this exception type.
-     * @param message The error message
-     */
-    public CompilationException(final String message) {
-        super(message);
-    }
-
-    /**
-     * Creates an instance of this exception type.
-     * @param cause The root cause
-     */
-    public CompilationException(final Throwable cause) {
-        super();
-        _cause = cause;
-    }
-
-    /**
-     * Match the JDK 1.4 Throwable version of getCause() on JDK<1.4 systems.
-     *
-     * @return The throwable cause of this exception.
-     */
-    public final Throwable getCause() {
-        return _cause;
-    }
-
-    /**
-     * Print a stack trace to stderr.
-     */
-    public final void printStackTrace() {
-        // Print the stack trace for this exception.
-        super.printStackTrace();
-
-        if (_cause != null) {
-            System.err.print("Caused by: ");
-            _cause.printStackTrace();
-        }
-    }
-
-    /**
-     * Print a stack trace to the specified PrintStream.
-     *
-     * @param s The PrintStream to print a stack trace to.
-     */
-    public final void printStackTrace(final PrintStream s) {
-        // Print the stack trace for this exception.
-        super.printStackTrace(s);
-
-        if (_cause != null) {
-            s.print("Caused by: ");
-            _cause.printStackTrace(s);
-        }
-    }
-
-    /**
-     * Print a stack trace to the specified PrintWriter.
-     *
-     * @param w The PrintWriter to print a stack trace to.
-     */
-    public final void printStackTrace(final PrintWriter w) {
-        // Print the stack trace for this exception.
-        super.printStackTrace(w);
-
-        if (_cause != null) {
-            w.print("Caused by: ");
-            _cause.printStackTrace(w);
-        }
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/Compiler.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/Compiler.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/Compiler.java	(working copy)
@@ -1,37 +0,0 @@
-/*
- * Copyright 2005 Werner Guttmann
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.exolab.castor.tests.framework;
-
-public interface Compiler {
-    /**
-     * Compiles the content of a directory tree.
-     * @throws CompilationException If the build fails.
-     */
-    void compileDirectory() throws CompilationException;
-
-    /**
-     * Configures the compiler to provide the -source argument for compilation.
-     * The Java source version is a float that is expected to be a value such as
-     * <tt>1.3</tt>, <tt>1.4</tt>, or<tt>1.5</tt>. However, integral
-     * values higher than 4 will be converted to the proper value so for example
-     * you can provide <tt>5</tt> as the Java source version.
-     *
-     * @param javaSourceVersion
-     *            The Java source version.
-     */
-    void setJavaSourceVersion(float javaSourceVersion);
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/CTFUtils.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/CTFUtils.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/CTFUtils.java	(working copy)
@@ -1,181 +0,0 @@
-/*
- * Redistribution and use of this software and associated documentation
- * ("Software"), with or without modification, are permitted provided
- * that the following conditions are met:
- *
- * 1. Redistributions of source code must retain copyright
- *    statements and notices.  Redistributions must also contain a
- *    copy of this document.
- *
- * 2. Redistributions in binary form must reproduce the
- *    above copyright notice, this list of conditions and the
- *    following disclaimer in the documentation and/or other
- *    materials provided with the distribution.
- *
- * 3. The name "Exolab" must not be used to endorse or promote
- *    products derived from this Software without prior written
- *    permission of Intalio, Inc.  For written permission,
- *    please contact info@exolab.org.
- *
- * 4. Products derived from this Software may not be called "Exolab"
- *    nor may "Exolab" appear in their names without prior written
- *    permission of Intalio, Inc. Exolab is a registered
- *    trademark of Intalio, Inc.
- *
- * 5. Due credit should be given to the Exolab Project
- *    (http://www.exolab.org/).
- *
- * THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
- * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
- * INTALIO, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Copyright 2002 (C) Intalio, Inc. All Rights Reserved.
- *
- * $Id$
- *
- */
-package org.exolab.castor.tests.framework;
-
-import java.io.StringReader;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.exolab.castor.tests.framework.xmldiff.XMLDiff;
-import org.exolab.castor.xml.MarshalException;
-import org.exolab.castor.xml.Unmarshaller;
-import org.exolab.castor.xml.ValidationException;
-
-/**
- * This class contains utility methods needed by the CTF.
- *
- * @author <a href="mailto:kvisco@intalio.com">Keith Visco</a>
- * @author <a href="mailto:blandin@intalio.com">Arnaud Blandin</a>
- * @version $Revision$ $Date: 2005-03-05 06:42:06 -0700 (Sat, 05 Mar 2005) $
- */
-public class CTFUtils {
-    /**
-     * The Java primitives
-     */
-    public static final String BOOLEAN   = "boolean";
-    public static final String BYTE      = "byte";
-    public static final String CHARACTER = "character";
-    public static final String DOUBLE    = "double";
-    public static final String FLOAT     = "float";
-    public static final String INT       = "int";
-    public static final String LONG      = "long";
-    public static final String SHORT     = "short";
-    public static final String STRING    = "String";
-
-    private static Map nameMap = new HashMap();
-    static {
-        nameMap.put(BOOLEAN,   Boolean.TYPE);
-        nameMap.put(BYTE,      Byte.TYPE);
-        nameMap.put(CHARACTER, Character.TYPE);
-        nameMap.put(DOUBLE,    Double.TYPE);
-        nameMap.put(FLOAT,     Float.TYPE);
-        nameMap.put(INT,       Integer.TYPE);
-        nameMap.put(LONG,      Long.TYPE);
-        nameMap.put(SHORT,     Short.TYPE);
-    }
-
-    /**
-     * Compares two XML documents located at 2 given URLs, returning the number
-     * of differences or 0 if both documents are 'XML equivalent'.
-     *
-     * @param document1 the URL of the first XML document.
-     * @param document2 the URL of the second XML document.
-     * @return an int indicating the number of differences or 0 if both
-     *         documents are 'XML equivalent'.
-     * @throws java.io.IOException if an error occurs reading either XML
-     *             document
-     */
-    public static int compare(String document1, String document2) throws java.io.IOException {
-        XMLDiff diff = new XMLDiff(document1, document2);
-        return diff.compare();
-    }
-
-    /**
-     * Returns the class associated with the given name.
-     *
-     * @param name the fully qualified name of the class to return. Primitives
-     *            are handled through their name and not their class name. For
-     *            instance 'boolean' should be used instead of
-     *            'java.lang.Boolean.TYPE'.
-     * @param loader the ClassLoader to use if the class needs to be loaded
-     * @return the class associated with given name.
-     * @throws ClassNotFoundException if the given class cannot be loaded using
-     *             the provided class loader.
-     */
-    public static Class getClass(String name, ClassLoader loader) throws ClassNotFoundException {
-        if (name == null) {
-            throw new IllegalArgumentException("Name shouldn't be null.");
-        }
-
-        Class clazz = (Class) nameMap.get(name);
-        if (clazz != null) {
-            return clazz;
-        }
-
-        return loader.loadClass(name);
-    }
-
-   /**
-     * Converts the given value to a Java representation that corresponds to the
-     * given type.
-     *
-     * @param value the value to be converted
-     * @param type a string representation of the java type.
-     * @param loader an optional ClassLoader used in case we need to use the
-     *            Unmarshaller to retrieve a complex java object.
-     * @return an java object that corresponds to the given value converted to a
-     *         java type according to the type passed as parameter.
-     * @throws ClassNotFoundException if the type is not a recognized primitive
-     *             type and the class loader provided cannot load the type
-     * @throws MarshalException if the type is not a recognized primitive type
-     *             and no Marshaller can be found for that type
-     */
-    public static Object instantiateObject(String type, String value, ClassLoader loader)
-                                        throws ClassNotFoundException, MarshalException {
-        if (type.equals(STRING) || type.equals(String.class.getName())) {
-            return value;
-        } else if (type.equals(BOOLEAN) || type.equals(Boolean.class.getName())) {
-            return new Boolean(value);
-        } else if (type.equals(BYTE) || type.equals(Byte.class.getName())) {
-            return new Byte(value);
-        } else if (type.equals(CHARACTER) || type.equals(Character.class.getName())) {
-            return new Character(value.charAt(0));
-        } else if (type.equals(DOUBLE) || type.equals(Double.class.getName())) {
-            return new Double(value);
-        } else if (type.equals(FLOAT) || type.equals(Float.class.getName())) {
-            return new Float(value);
-        } else if (type.equals(INT) || type.equals(Integer.class.getName())) {
-            return new Integer(value);
-        } else if (type.equals(LONG) || type.equals(Long.class.getName())) {
-            return new Long(value);
-        } else if (type.equals(SHORT) || type.equals(Short.class.getName())) {
-            return new Short(value);
-        }
-
-        //-- Else we let the unmarshaller get us the class
-        try {
-            Class clazz = loader.loadClass(type);
-            Unmarshaller unmarshaller = new Unmarshaller(clazz);
-            return unmarshaller.unmarshal(new StringReader(value));
-        } catch (ValidationException e) {
-            //--this can't happen, just log it
-            e.printStackTrace();
-        }
-
-        return null;
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/FileServices.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/FileServices.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/FileServices.java	(working copy)
@@ -1,197 +0,0 @@
-/*
- * Redistribution and use of this software and associated documentation
- * ("Software"), with or without modification, are permitted provided
- * that the following conditions are met:
- *
- * 1. Redistributions of source code must retain copyright
- *    statements and notices.  Redistributions must also contain a
- *    copy of this document.
- *
- * 2. Redistributions in binary form must reproduce the
- *    above copyright notice, this list of conditions and the
- *    following disclaimer in the documentation and/or other
- *    materials provided with the distribution.
- *
- * 3. The name "Exolab" must not be used to endorse or promote
- *    products derived from this Software without prior written
- *    permission of Intalio, Inc.  For written permission,
- *    please contact info@exolab.org.
- *
- * 4. Products derived from this Software may not be called "Exolab"
- *    nor may "Exolab" appear in their names without prior written
- *    permission of Intalio, Inc. Exolab is a registered
- *    trademark of Intalio, Inc.
- *
- * 5. Due credit should be given to the Exolab Project
- *    (http://www.exolab.org/).
- *
- * THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
- * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
- * INTALIO, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Copyright 2002 (C) Intalio, Inc. All Rights Reserved.
- *
- * $Id$
- */
-package org.exolab.castor.tests.framework;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Enumeration;
-import java.util.jar.JarFile;
-import java.util.zip.ZipEntry;
-
-/**
- * This class is a set of tools for manipulating files needed by the CTF.
- *
- * @author <a href="mailto:blandin@intalio.com">Arnaud Blandin</a>
- * @version $Revision$ $Date: 2005-03-05 06:42:06 -0700 (Sat, 05 Mar 2005) $
- */
-public class FileServices {
-
-    public static final String CVS  = "CVS";
-    public static final String SVN  = ".svn";
-    public static final String XSD  = ".xsd";
-    public static final String XML  = ".xml";
-    public static final String JAVA = ".java";
-    public static final String JAR  = ".jar";
-
-    /**
-     * Copy all the needed documents (java, xsd, xml file) of given file (jar or
-     * directory) to a specified directory.
-     *
-     * @param file the file that contains the entries to copy
-     * @param root the destination directory to copy files to
-     * @throws IOException if an error occurs while copying files
-     * @throws FileNotFoundException if an already-located file cannot be found
-     */
-    protected static void copySupportFiles(File file, File root) throws IOException, FileNotFoundException {
-        if (file == null) {
-            throw new IllegalArgumentException("The Entry file is null");
-        }
-        if (root == null) {
-            throw new IllegalArgumentException("The destination directory is null");
-        }
-
-        if (file.isDirectory()) {
-            copySupportFilesForDirectory(file, root);
-        } else if (file.getName().endsWith(JAR)) {
-            copySupportFilesForJarFile(file, root);
-        } else {
-            //ignore other file type
-        }
-    }
-
-    /**
-     * Unzips support files out of the JAR to our output directory. See
-     * {@link #isSupportFile(String)} for the definition of support file. This
-     * method does not totally unzip the JAR file. It only extracts certain
-     * important files out of the JAR.
-     *
-     * @param file the file that contains the entries to copy
-     * @param root the destination directory to copy files to
-     * @throws IOException if an error occurs while copying files
-     * @throws FileNotFoundException if an already-located file cannot be found
-     */
-    private static void copySupportFilesForJarFile(File file, File root) throws IOException, FileNotFoundException {
-        JarFile jar = new JarFile(file);
-        for (Enumeration e = jar.entries(); e.hasMoreElements(); ) {
-            ZipEntry entry = (ZipEntry)e.nextElement();
-            if (isSupportFile(entry.getName())) {
-                InputStream src = jar.getInputStream(entry);
-                File out = new File(root, entry.getName());
-                out.getParentFile().mkdirs();
-                copy(src, new FileOutputStream(out));
-                src.close();
-            }
-        }//for
-    }
-
-    /**
-     * Copies support files from one directory to our output directory,
-     * recursing into other directories. See {@link #isSupportFile(String)} for
-     * the definition of support file.
-     *
-     * @param file the file that contains the entries to copy
-     * @param root the destination directory to copy files to
-     * @throws IOException if an error occurs while copying files
-     * @throws FileNotFoundException if an already-located file cannot be found
-     */
-    private static void copySupportFilesForDirectory(File file, File root) throws FileNotFoundException, IOException {
-        File[] entries = file.listFiles();
-        for (int i=0 ; i<entries.length; i++) {
-            File tempEntry = entries[i];
-            if (isSupportFile(tempEntry.getName())) {
-                File out = new File(root, tempEntry.getName());
-                out.getParentFile().mkdir();
-                FileOutputStream dest = new FileOutputStream(out);
-
-                InputStream src = new FileInputStream(tempEntry);
-                copy(src, dest);
-                src.close();
-                dest.close();
-            } else if (tempEntry.isDirectory()) {
-                File out = new File(root, tempEntry.getName());
-                out.mkdir();
-                copySupportFiles(tempEntry, out);
-            }
-        }//for
-    }
-
-    /**
-     * Copies an InputStream into a OutputStream.
-     *
-     * @param src Source input stream
-     * @param dest Destination output stream
-     * @throws IOException if an error occurs while copying files
-     * @throws FileNotFoundException if an already-located file cannot be found
-     */
-    protected static void copy(InputStream src, OutputStream dest) throws FileNotFoundException, IOException {
-        final int BUF_SIZE = 16 * 1024;
-        byte[] buf = new byte[BUF_SIZE];
-        int read;
-        while (true) {
-            read = src.read(buf, 0, BUF_SIZE);
-            if (read == -1) {
-                break;
-            }
-            dest.write(buf, 0, read);
-        }
-    }
-
-    /**
-     * Return true if the file is a support file for the test. A support file is
-     * a schema or a java file.
-     *
-     * @param name File name to check to see if it represents a support file
-     * @return true if the file is a support file for the test.
-     */
-    private static boolean isSupportFile(String name) {
-        return name.endsWith(XSD) || name.endsWith(JAVA) || name.endsWith(XML);
-    }
-
-    /**
-     * Return true if the file provided is a special source control management
-     * directory that we want to ignore.
-     * @param name Name of a directory
-     * @return true if the file provided is an SCM directory
-     */
-    public static boolean isScmDirectory(String name) {
-        return name.endsWith(FileServices.CVS) || name.equals(FileServices.SVN);
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/MarshallingFrameworkTestCase.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/MarshallingFrameworkTestCase.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/MarshallingFrameworkTestCase.java	(working copy)
@@ -1,253 +0,0 @@
-/*
- * Redistribution and use of this software and associated documentation
- * ("Software"), with or without modification, are permitted provided
- * that the following conditions are met:
- *
- * 1. Redistributions of source code must retain copyright
- *    statements and notices.  Redistributions must also contain a
- *    copy of this document.
- *
- * 2. Redistributions in binary form must reproduce the
- *    above copyright notice, this list of conditions and the
- *    following disclaimer in the documentation and/or other
- *    materials provided with the distribution.
- *
- * 3. The name "Exolab" must not be used to endorse or promote
- *    products derived from this Software without prior written
- *    permission of Intalio, Inc.  For written permission,
- *    please contact info@exolab.org.
- *
- * 4. Products derived from this Software may not be called "Exolab"
- *    nor may "Exolab" appear in their names without prior written
- *    permission of Intalio, Inc. Exolab is a registered
- *    trademark of Intalio, Inc.
- *
- * 5. Due credit should be given to the Exolab Project
- *    (http://www.exolab.org/).
- *
- * THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
- * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
- * INTALIO, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Copyright 2001-2003 (C) Intalio, Inc. All Rights Reserved.
- *
- * $Id$
- */
-package org.exolab.castor.tests.framework;
-
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.net.URL;
-import java.net.URLClassLoader;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.exolab.castor.mapping.Mapping;
-import org.exolab.castor.tests.framework.testDescriptor.ListenerType;
-import org.exolab.castor.tests.framework.testDescriptor.MarshallingTest;
-import org.exolab.castor.tests.framework.testDescriptor.RootType;
-import org.exolab.castor.tests.framework.testDescriptor.UnitTestCase;
-import org.xml.sax.InputSource;
-
-/**
- * This class encapsulates all the logic to run the test patterns for the Castor
- * marshalling framework. This include introspection and mapping.
- *
- * @author <a href="mailto:gignoux@kernelcenter.com">Sebastien Gignoux</a>
- * @author <a href="mailto:blandin@intalio.com">Arnaud Blandin</a>
- * @version $Revision$ $Date: 2004-09-10 18:23:03 -0600 (Fri, 10 Sep 2004) $
- */
-public class MarshallingFrameworkTestCase extends XMLTestCase {
-
-    /**
-     * Contains the configuration for this test case. The configuration is
-     * directly read for the test descriptor file located in a jar or in a
-     * directory.
-     */
-    protected final MarshallingTest _marshallingConf;
-    /** If true, the randomize() function has been implemented in the root class. */
-    protected final boolean         _hasRandom;
-
-    /**
-     * Creates a CTF test case for the Marshalling framework.
-     *
-     * @param test A Test Case
-     * @param unit A configuration element for a test case from a TestDescriptor
-     *            configuration file
-     * @param marshalling a Marshalling test definition from a TestDescriptor
-     *            configuration file
-     */
-    public MarshallingFrameworkTestCase(final CastorTestCase test, final UnitTestCase unit,
-                                        final MarshallingTest marshalling) {
-        super(test, unit);
-        _marshallingConf = marshalling;
-
-        RootType rootType = _marshallingConf.getRoot_Object();
-        if (rootType == null) {
-            throw new IllegalArgumentException("You must give a root object for a Marshaling Test: "
-                    + _outputRootFile + ", " +  getName());
-        }
-
-        _rootClassName = rootType.getContent();
-        if (_rootClassName == null) {
-            throw new IllegalArgumentException("You must give a root object for a Marshaling Test:"
-                    + _outputRootFile + ", " +  getName());
-        }
-
-        _hasRandom = rootType.getRandom();
-        _hasDump   = rootType.getDump();
-    }
-
-    /**
-     * Create a new MarshallingFrameworkTestCase with the given name and a null
-     * marshalling configuration.  This constructor should not be used!
-     *
-     * @param name Name for the MarshallingFrameworkTestCase
-     */
-    public MarshallingFrameworkTestCase(final String name) {
-        super(name);
-        throw new IllegalArgumentException("You cannot use the name-only constructor");
-    }
-
-    /**
-     * Returns the test suite for this given test setup.
-     * @return the test suite for this given test setup.
-     */
-    public Test suite() {
-        TestSuite suite = new TestSuite(_name);
-
-        String name = getTestSuiteName();
-        name = (name != null) ? name + "#" + _name : _name;
-
-        if (_unitTest.getCustomTest() != null) {
-            suite.addTest(new TestWithCustomTest(name, this));
-        } else {
-            suite.addTest(new TestWithReferenceDocument(name, this));
-            if (_hasRandom) {
-                suite.addTest(new TestWithRandomObject(name, this));
-            }
-        }
-        return suite;
-    }
-
-    /**
-     * Sets up this test suite. Loads the mapping file if any.
-     * <p>
-     * Nothing in this setUp() method should ever be expected to fail. Thus,
-     * there are no checks against _failure. If anything goes wrong here, there
-     * is a problem with the individual test case configuration.
-     *
-     * @throws Exception
-     *             if anything goes wrong
-     */
-    protected void setUp() throws java.lang.Exception {
-        verbose("\n================================================");
-        verbose("Test suite '"+_test.getName()+"': setting up test '" + _name+"'");
-        verbose("================================================\n");
-
-        FileServices.copySupportFiles(_test.getTestFile(),_outputRootFile);
-
-        // Compile the source directory for this test, if not already done
-        if (!_test.isDirectoryCompiled()) {
-            verbose("-->Compiling any necessary source files in " + _outputRootFile);
-            Compiler compiler = new SunJavaCompiler(_outputRootFile);
-            if (_unitTest.hasJavaSourceVersion()) {
-                compiler.setJavaSourceVersion(_unitTest.getJavaSourceVersion());
-            }
-            try {
-                compiler.compileDirectory();
-                _test.setDirectoryCompiled(true);
-            } catch (CompilationException e) {
-                if (_printStack) {
-                    e.printStackTrace(System.out);
-                }
-                fail("Build Failed: " + e.getMessage());
-            }
-        }
-
-        //-- Add outputRoot to classpath
-        ClassLoader loader = _test.getClassLoader();
-        loader = new URLClassLoader(new URL[] { _outputRootFile.toURL() }, loader);
-        _test.setClassLoader(loader);
-
-        verbose("Root class specified in TestDescriptor...");
-        verbose("Loading class: " + _rootClassName);
-        _rootClass = loader.loadClass(_rootClassName);
-
-        // Try to load the mapping file if any, else we will use the introspector
-        String mappingFilePath = null;
-        if (_unitTest.getUnitTestCaseChoice() != null) {
-            mappingFilePath = _unitTest.getUnitTestCaseChoice().getMapping_File();
-        }
-
-        if (mappingFilePath != null) {
-            configureMapping(loader, mappingFilePath);
-        } else {
-            verbose("##### TESTING INTROSPECTION #####");
-            _mapping = null;
-        }
-    }
-
-    /**
-     * Clean up after a test -- nothing to do except display output
-     * @throws Exception if anything goes wrong
-     */
-    protected void tearDown() throws java.lang.Exception {
-        verbose("\n================================================");
-        verbose("Test suite '"+_test.getName()+"': test '" + _name+"' complete.");
-        verbose("================================================\n");
-    }
-
-    /**
-     * For a test case with a mapping, load the mapping. If there is a listener,
-     * initialize it.
-     *
-     * @param loader ClassLoader for this test case
-     * @param mappingFilePath Path to the mapping file
-     * @throws Exception if anything goes wrong during the test
-     */
-    private void configureMapping(final ClassLoader loader, final String mappingFilePath) throws Exception {
-        verbose("##### TESTING MAPPING #####");
-        verbose("Mapping file: " + mappingFilePath);
-        InputStream mappingFile = loader.getResourceAsStream(mappingFilePath);
-
-        if (mappingFile == null) {
-            throw new FileNotFoundException("Unable to locate the mapping file '"
-                     + mappingFilePath + "' for the test '" + _test.getName() + "'");
-        }
-
-        _mapping = new Mapping(loader);
-        InputSource source = new InputSource(mappingFile);
-        source.setSystemId(mappingFilePath);
-        _mapping.loadMapping(source);
-//      mappingFile.close(); // FIXME:  We never close this file!  (But cannot close it here)
-
-        ListenerType listener = _unitTest.getListener();
-        if (listener != null) {
-            String listenerName = listener.getClassName();
-            try {
-                // See if we can load the class...
-                initializeListeners(listener);
-            } catch (ClassNotFoundException cnfex) {
-                //Class#forName
-                fail("The listener '" + listenerName + "' cannot be found in the CLASSPATH");
-            } catch (InstantiationException iex) {
-                fail("The listener '" + listenerName + "' cannot be instantiated");
-            } catch (IllegalAccessException iaex) {
-                fail("Constructing a '"+listenerName+"' failed: " + iaex);
-            }
-            verbose("##### TESTING LISTENER CLASS " + listenerName + " #####");
-        } // listener != null;
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/ObjectModelBuilder.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/ObjectModelBuilder.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/ObjectModelBuilder.java	(working copy)
@@ -1,65 +0,0 @@
-/*
- * Redistribution and use of this software and associated documentation
- * ("Software"), with or without modification, are permitted provided
- * that the following conditions are met:
- *
- * 1. Redistributions of source code must retain copyright
- *    statements and notices.  Redistributions must also contain a
- *    copy of this document.
- *
- * 2. Redistributions in binary form must reproduce the
- *    above copyright notice, this list of conditions and the
- *    following disclaimer in the documentation and/or other
- *    materials provided with the distribution.
- *
- * 3. The name "Exolab" must not be used to endorse or promote
- *    products derived from this Software without prior written
- *    permission of Intalio, Inc.  For written permission,
- *    please contact info@exolab.org.
- *
- * 4. Products derived from this Software may not be called "Exolab"
- *    nor may "Exolab" appear in their names without prior written
- *    permission of Intalio, Inc. Exolab is a registered
- *    trademark of Intalio, Inc.
- *
- * 5. Due credit should be given to the Exolab Project
- *    (http://www.exolab.org/).
- *
- * THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
- * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
- * INTALIO, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Copyright 1999 (C) Intalio, Inc. All Rights Reserved.
- *
- * $Id$
- */
-package org.exolab.castor.tests.framework;
-
-/**
- * Encapsulates the hard-coded generation of an instance of an object model. It
- * has to be connected to an XML document during the test to check that they are
- * 'equivalent'.
- *
- * @author <a href="mailto:gignoux@intalio.com">Sebastien Gignoux</a>
- * @version $Revision$ $Date: 2003-10-15 09:17:49 -0600 (Wed, 15 Oct 2003) $
- */
-public interface ObjectModelBuilder {
-
-    /**
-     * Generates and returns a new instance from the hard-coded data.
-     *
-     * @return a new instance from the hard-coded data
-     * @throws Exception if anything goes wrong creating the instance
-     */
-    public Object buildInstance() throws Exception;
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/OnlySourceGenerationTestCase.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/OnlySourceGenerationTestCase.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/OnlySourceGenerationTestCase.java	(working copy)
@@ -1,111 +0,0 @@
-/*
- * Copyright 2006 Edward Kuns
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: OnlySourceGenerationTestCase.java 0000 2006-10-05 22:00:00Z ekuns $
- */
-package org.exolab.castor.tests.framework;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.exolab.castor.tests.framework.testDescriptor.OnlySourceGenerationTest;
-import org.exolab.castor.tests.framework.testDescriptor.UnitTestCase;
-
-/**
- * This class encapsulate all the logic to run the tests patterns for the source
- * generator. It is able to run the source generator by itself and then compile
- * the file that have been generated.  This class does not do anything additional.
- * It only runs the source generator and ensures that the generated source will
- * compile without error.
- *
- * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a>
- * @version $Revision: 0000 $ $Date: $
- */
-public class OnlySourceGenerationTestCase extends XMLTestCase {
-
-    /** We add this fixed string to the end of our testcase name. */
-    private static final String ONLY_GENERATION = "_OnlySourceGeneration";
-
-    /** Generates and compiles source in a test harness, but does nothing else. */
-    private final TestSourceGenerator        _sourceGenerator;
-
-    /**
-     * Creates a new test case for the given setup.
-     *
-     * @param test the reference to the jar/directory
-     * @param unit the UnitTestCase that wraps the configuration for this XML
-     *            Test case.
-     * @param sourceGen the Source Generator test to be executed
-     * @param outputRoot the directory that contains the files needed for the
-     *            test
-     */
-    public OnlySourceGenerationTestCase(final CastorTestCase test, final UnitTestCase unit,
-                                        final OnlySourceGenerationTest sourceGen) {
-        super(test, unit);
-        _sourceGenerator = new TestSourceGenerator(test, unit, sourceGen);
-    }
-
-    /**
-     * Create a new SourceGeneratorTestCase with the given name.
-     * @param name name for the test case
-     */
-    public OnlySourceGenerationTestCase(final String name) {
-        super(name);
-        _sourceGenerator = null;
-    }
-
-    /**
-     * Returns the test suite for this given test setup.
-     * @return the test suite for this given test setup.
-     */
-    public Test suite() {
-        TestSuite suite  = new TestSuite(_name);
-
-        String name = getTestSuiteName();
-        name = (name != null) ? name + "#" + _name : _name;
-        this.setName(name + ONLY_GENERATION);
-
-        suite.addTest(this);
-        return suite;
-    }
-
-    /**
-     * Sets up this test suite.
-     * @throws java.lang.Exception if anything goes wrong
-     */
-    protected void setUp() throws java.lang.Exception {
-        verbose("\n================================================");
-        verbose("Test suite '"+_test.getName()+"': setting up test '" + _name+"'");
-        verbose("================================================\n");
-        _sourceGenerator.setUp();
-    }
-
-    public void runTest() {
-        _sourceGenerator.runTest();
-        verbose("-->Done");
-    }
-
-    /**
-     * Cleans up after this unit test (nothing to do except provide output).
-     * @throws java.lang.Exception never
-     */
-    protected void tearDown() throws java.lang.Exception {
-        verbose("\n================================================");
-        verbose("Test suite '"+_test.getName()+"': test '" + _name+"' complete.");
-        verbose("================================================\n");
-        _sourceGenerator.tearDown();
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/RandomHelper.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/RandomHelper.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/RandomHelper.java	(working copy)
@@ -1,579 +0,0 @@
-/*
- * Redistribution and use of this software and associated documentation
- * ("Software"), with or without modification, are permitted provided
- * that the following conditions are met:
- *
- * 1. Redistributions of source code must retain copyright
- *    statements and notices.  Redistributions must also contain a
- *    copy of this document.
- *
- * 2. Redistributions in binary form must reproduce the
- *    above copyright notice, this list of conditions and the
- *    following disclaimer in the documentation and/or other
- *    materials provided with the distribution.
- *
- * 3. The name "Exolab" must not be used to endorse or promote
- *    products derived from this Software without prior written
- *    permission of Intalio, Inc.  For written permission,
- *    please contact info@exolab.org.
- *
- * 4. Products derived from this Software may not be called "Exolab"
- *    nor may "Exolab" appear in their names without prior written
- *    permission of Intalio, Inc. Exolab is a registered
- *    trademark of Intalio, Inc.
- *
- * 5. Due credit should be given to the Exolab Project
- *    (http://www.exolab.org/).
- *
- * THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
- * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
- * INTALIO, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Copyright 1999 (C) Intalio, Inc. All Rights Reserved.
- *
- * $Id$
- */
-package org.exolab.castor.tests.framework;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Random;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.TreeSet;
-import java.util.Vector;
-
-import org.exolab.castor.types.RecurringDuration;
-import org.exolab.castor.types.TimeDuration;
-
-/**
- * Assists in the generation of random instances of a given object model.
- *
- * @author <a href="mailto:gignoux@intalio.com">Sebastien Gignoux</a>
- * @version $Revision$ $Date: 2006-04-13 06:47:36 -0600 (Thu, 13 Apr 2006) $
- */
-public class RandomHelper {
-
-    /**
-     * The seed which was used to initialize the pseudo-random number generator.
-     */
-    private static long _seed;
-
-    /**
-     * The pseudo-random number generator.
-     */
-    private static Random _rand;
-
-    static {
-        _seed = System.currentTimeMillis();
-        _rand = new Random(_seed);
-    }
-
-    /**
-     * The maximum length of a string to be generated by rndString().
-     */
-    private static final int MAX_STRING_LENGTH = 50;
-
-    /**
-     * The maximum length of a collection (like a Vector) generated by rndString().
-     */
-    private static final int MAX_COLLECTION_LENGTH = 50;
-
-    /**
-     * List of the characters that can be used to compose a string.
-     */
-    private static final String PRINTABLE_CHAR = " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_:.,=+~!@#$%^&*()[]{}\\|?";
-
-    /**
-     * Returns a populated array of int of random length.
-     *
-     * @param array An unused parameter, used only for polymorphism.
-     * @param c An unused parameter that indicates we are making a random
-     *            Object, not a random primitive
-     * @return a populated array of int of random length.
-     */
-    public static int[] getRandom(int[] array, Class c) {
-        int size = _rand.nextInt(MAX_COLLECTION_LENGTH);
-
-        int[] ret = new int[size];
-        for (int i=0; i<size; ++i) {
-            ret[i] = _rand.nextInt();
-        }
-
-        return ret;
-    }
-
-    /**
-     * Returns a populated array of byte of random length.
-     *
-     * @param array An unused parameter, used only for polymorphism.
-     * @param c An unused parameter that indicates we are making a random
-     *            Object, not a random primitive
-     * @return a populated array of byte of random length.
-     */
-    public static byte[] getRandom(byte[] array, Class c) {
-        int size = _rand.nextInt(MAX_COLLECTION_LENGTH);
-
-        byte[] ret = new byte[size];
-        _rand.nextBytes(ret);
-
-        return ret;
-    }
-
-    /**
-     * Returns a populated array of String of random length.
-     *
-     * @param array An unused parameter, used only for polymorphism.
-     * @param c An unused parameter that indicates we are making a random
-     *            Object, not a random primitive
-     * @return a populated array of String of random length.
-     */
-    public static String[] getRandom(String[] array, Class c) {
-        int size = _rand.nextInt(MAX_COLLECTION_LENGTH);
-
-        String[] newArray = new String[size];
-        for (int i=0; i<size; ++i) {
-            newArray[i] = getRandom(new String(), null);
-        }
-
-        return newArray;
-    }
-
-    /**
-     * Creates a populated array of type c of random length. If the class to put
-     * into the vector implements CastorTestable, randomizeFields() will be
-     * called on the objects.
-     *
-     * @param array An unused parameter, used only for polymorphism.
-     * @param c the type of object to put in the array
-     * @return a populated array of random length.
-     * @throws InstantiationException if the class cannot be instantiated.
-     * @throws IllegalAccessException if the class cannot be accessed.
-     */
-    public static Object[] getRandom(Object[] array, Class c)
-        throws InstantiationException, IllegalAccessException {
-
-        int size = _rand.nextInt(MAX_COLLECTION_LENGTH);
-        Object[] newArray = new Object[size];
-
-        for (int i=0; i<size; ++i) {
-            newArray[i] = c.newInstance();
-            if (CastorTestable.class.isAssignableFrom(c)) {
-                ((CastorTestable)newArray[i]).randomizeFields();
-            }
-        }
-
-        return newArray;
-    }
-
-
-    /**
-     * Returns a populated vector of random length. If the class to put into the
-     * vector implements CastorTestable, randomizeFields() will be called on the
-     * objects.
-     *
-     * @param vect the vector to populate, if null a new Vector will be created.
-     * @param c the type of object to put in the vector.
-     * @return a populated Vector of random length.
-     * @throws InstantiationException if the class cannot be instantiated.
-     * @throws IllegalAccessException if the class cannot be accessed.
-     */
-    public static Vector getRandom(Vector vect, Class c)
-        throws InstantiationException, IllegalAccessException {
-
-        Vector vector = (vect != null) ? vect : new Vector();
-
-        int size = _rand.nextInt(MAX_COLLECTION_LENGTH);
-        for (int i=0; i<size; ++i) {
-            Object object = c.newInstance();
-            vector.add(object);
-            if (CastorTestable.class.isAssignableFrom(c)) {
-                ((CastorTestable)object).randomizeFields();
-            }
-        }
-
-        return vector;
-    }
-
-    /**
-     * Returns a populated ArrayList of random length. If the class of the
-     * object contained into the vector implements CastorTestable,
-     * randomizeFields() will be called on the objects.
-     *
-     * @param al the ArrayList to populate
-     * @param c the type of object to put in the vector
-     * @return a populated ArrayList of random length.
-     * @throws InstantiationException if the class cannot be instantiated
-     * @throws IllegalAccessException if the class cannot be accessed
-     */
-    public static ArrayList getRandom(ArrayList al, Class c)
-        throws InstantiationException, IllegalAccessException {
-        return new ArrayList(RandomHelper.getRandom(new Vector(al), c));
-    }
-
-    /**
-     * Returns a populated Collection of random length. If the class of the
-     * object contained into the vector implements CastorTestable,
-     * randomizeFields() will be called on the objects.
-     *
-     * @param al the ArrayList to populate
-     * @param c the type of object to put in the vector
-     * @return a populated ArrayList of random length.
-     * @throws InstantiationException if the class cannot be instantiated
-     * @throws IllegalAccessException if the class cannot be accessed
-     */
-    public static Collection getRandom(Collection al, Class c)
-        throws InstantiationException, IllegalAccessException {
-        return new LinkedList(RandomHelper.getRandom(new Vector(al), c));
-    }
-
-    /**
-     * Returns a populated List of random length. If the class of the object
-     * contained into the vector implements CastorTestable, randomizeFields()
-     * will be called on the objects.
-     *
-     * @param al the ArrayList to populate
-     * @param c the type of object to put in the vector
-     * @return a populated ArrayList of random length.
-     * @throws InstantiationException if the class cannot be instantiated
-     * @throws IllegalAccessException if the class cannot be accessed
-     */
-    public static List getRandom(List al, Class c)
-        throws InstantiationException, IllegalAccessException {
-        return new LinkedList(RandomHelper.getRandom(new Vector(al), c));
-    }
-
-    /**
-     * Returns a populated Set of random length. If the class of the object
-     * contained into the vector implements CastorTestable, randomizeFields()
-     * will be called on the objects.
-     *
-     * @param al the Set to populate
-     * @param c the type of object to put in the vector
-     * @return a populated Set of random length.
-     * @throws InstantiationException if the class cannot be instantiated
-     * @throws IllegalAccessException if the class cannot be accessed
-     */
-    public static Set getRandom(Set al, Class c)
-        throws InstantiationException, IllegalAccessException {
-        return new HashSet(RandomHelper.getRandom(new Vector(al), c));
-    }
-
-    /**
-     * Returns a populated SortedSet of random length. If the class of the
-     * object contained into the vector implements CastorTestable,
-     * randomizeFields() will be called on the objects.
-     *
-     * @param al the SortedSet to populate
-     * @param c the type of object to put in the vector
-     * @return a populated SortedSet of random length.
-     * @throws InstantiationException if the class cannot be instantiated
-     * @throws IllegalAccessException if the class cannot be accessed
-     */
-    public static SortedSet getRandom(SortedSet al, Class c)
-        throws InstantiationException, IllegalAccessException {
-        return new TreeSet(RandomHelper.getRandom(new Vector(al), c));
-    }
-
-    /**
-     * Returns a random String that will not have leading or trailing whitespace
-     * and that will not have consecutive internal whitespace. To get a random
-     * string without these restrictions, use
-     * {@link #getRandom(String, Class, boolean)} with the boolean argument
-     * <code>false</code>.
-     *
-     * @param s An unused parameter, used only for polymorphism.
-     * @param c An unused parameter that indicates we are making a random
-     *            Object, not a random primitive
-     * @return a random string
-     */
-    public static String getRandom(String s, Class c) {
-        return getRandom(s, c, true);
-    }
-
-    /**
-     * Returns a random String, optionally with leading and trailing whitespace
-     * removed and internal consecutive whitespace collapsed.
-     *
-     * @param s An unused parameter, used only for polymorphism.
-     * @param c An unused parameter that indicates we are making a random
-     *            Object, not a random primitive
-     * @param collapseWhitespace if true, removes leading and trailing
-     *            whitespace and collapses multiple consecutive spaces.
-     * @return a random string
-     * @see <a href="http://www.w3.org/TR/xmlschema-2/#rf-whiteSpace">the XML
-     *      schema definition of whitespace</a>
-     */
-    public static String getRandom(String s, Class c, boolean collapseWhitespace) {
-        int size = 1 + _rand.nextInt(MAX_STRING_LENGTH - 1);
-        char[] data = new char[size];
-        for (int i=0; i < size; ++i) {
-            data[i] = rndPrintableChar();
-        }
-
-        if (! collapseWhitespace) {
-            return new String(data);
-        }
-
-        // Make sure the first character is not whitespace
-        while (Character.isWhitespace(data[0])) {
-            data[0] = rndPrintableChar();
-        }
-
-        // Make sure the last character is not whitespace
-        while (Character.isWhitespace(data[size-1])) {
-            data[size-1] = rndPrintableChar();
-        }
-
-        // Make sure there are no consecutive whitespace characters
-        for (int i = 0; i < size - 1; i++) {
-            while (Character.isWhitespace(data[i]) && Character.isWhitespace(data[i+1])) {
-                data[i] = rndPrintableChar();
-            }
-        }
-
-        return new String(data);
-    }
-
-    /**
-     * Returns a random java.util.Date.
-     * @param date An unused parameter, used only for polymorphism.
-     * @param c An unused parameter that indicates we are making a random
-     *            Object, not a random primitive
-     * @return a random java.util.Date.
-     */
-    public static java.util.Date getRandom(java.util.Date date, Class c) {
-        long milli = _rand.nextLong();
-        return new java.util.Date(milli);
-    }
-
-    /**
-     * Returns a random Castor TimeDuration.
-     * @param date An unused parameter, used only for polymorphism.
-     * @param c An unused parameter that indicates we are making a random
-     *            Object, not a random primitive
-     * @return a random Castor timeDuration.
-     */
-    public static TimeDuration getRandom(TimeDuration date, Class c) {
-        long randLong = _rand.nextInt();
-        randLong = (randLong > 0) ? randLong : -randLong;
-        return new TimeDuration(randLong);
-    }
-
-    /**
-     * Returns a random Castor RecurringDuration.
-     *
-     * @param recurring An unused parameter, used only for polymorphism.
-     * @param c An unused parameter that indicates we are making a random
-     *            Object, not a random primitive
-     * @return a random Castor recurringDuration.
-     */
-    public static RecurringDuration getRandom(RecurringDuration recurring, Class c) {
-        short randShort;
-        long randLong = _rand.nextLong();
-        TimeDuration randDuration = new TimeDuration(randLong);
-        RecurringDuration result = new RecurringDuration(randDuration, randDuration);
-        short[] values = new short[10];
-        //only positive values are allowed
-        //century
-        randShort = (short) _rand.nextInt(99);
-        values[0] = (randShort > 0)? randShort:(short)-randShort;
-        //year
-        randShort = (short)_rand.nextInt(99);
-        values[1] = (randShort > 0)? randShort:(short)-randShort;
-        //month
-        randShort = (short)_rand.nextInt(12);
-        values[2] = (randShort > 0)? randShort:(short)-randShort;
-        //day
-        randShort = (short)_rand.nextInt(30);
-        values[3] = (randShort > 0)? randShort:(short)-randShort;
-        //hour
-        randShort = (short)_rand.nextInt(24);
-        values[4] = (randShort > 0)? randShort:(short)-randShort;
-        //minute
-        randShort = (short)_rand.nextInt(60);
-        values[5] = (randShort > 0)? randShort:(short)-randShort;
-        //second
-        randShort = (short)_rand.nextInt(60);
-        values[6] = (randShort > 0)? randShort:(short)-randShort;
-        //millisecond
-        randShort = (short)_rand.nextInt(99);
-        values[7] = (randShort > 0)? randShort:(short)-randShort;
-        //time zone hour
-        randShort = (short)_rand.nextInt(12);
-        values[8] = randShort;
-        //time zone minute
-        randShort = (short)_rand.nextInt(60);
-        values[9] = (randShort > 0)? randShort:(short)-randShort;
-        result.setValues(values);
-
-        values = null;
-        randDuration = null;
-
-        return result;
-    }
-
-    /**
-     * Returns a random Object of the type provided by class c.
-     *
-     * @param object An unused parameter, used only for polymorphism.
-     * @param c the type of object we will create a randomized instance of. This
-     *            class must implement CastorTestable.
-     * @return a random Object.
-     */
-    public static Object getRandom(Object object, Class c) {
-        try {
-            Object obj = c.newInstance();
-            if (obj.getClass().isAssignableFrom(CastorTestable.class)) {
-                ((CastorTestable)obj).randomizeFields();
-            }
-            return obj;
-        } catch (Exception e) {
-            // TODO: find a better way of handling this failure
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    /**
-     * Returns a random BigDecimal.
-     *
-     * @param bg An unused parameter, used only for polymorphism.
-     * @param c An unused parameter that indicates we are making a random
-     *            Object, not a random primitive
-     * @return a random BigDecimal.
-     */
-    public static BigDecimal getRandom(BigDecimal bg, Class c) {
-        return new BigDecimal(_rand.nextDouble());
-    }
-
-    /**
-     * Returns a random int.
-     * @param i An unused parameter, used only for polymorphism.
-     * @return a random int.
-     */
-    public static int getRandom(int i) {
-        return _rand.nextInt();
-    }
-
-    /**
-     * Returns a random float.
-     * @param f An unused parameter, used only for polymorphism.
-     * @return a random float.
-     */
-    public static float getRandom(float f) {
-        return _rand.nextFloat();
-    }
-
-
-    /**
-     * Returns a random boolean.
-     * @param b An unused parameter, used only for polymorphism.
-     * @return a random boolean.
-     */
-    public static boolean getRandom(boolean b) {
-        return _rand.nextBoolean();
-    }
-
-    /**
-     * Returns a random long.
-     * @param l An unused parameter, used only for polymorphism.
-     * @return a random long.
-     */
-    public static long getRandom(long l) {
-        return _rand.nextLong();
-    }
-
-    /**
-     * Returns a random double.
-     * @param d An unused parameter, used only for polymorphism.
-     * @return a random double.
-     */
-    public static double getRandom(double d) {
-        return _rand.nextDouble();
-    }
-
-    /**
-     * Returns a random printable char.
-     * @param c An unused parameter, used only for polymorphism.
-     * @return a random printable char.
-     */
-    public static char getRandom(char c) {
-        return rndPrintableChar();
-    }
-
-    /**
-     * Returns a random byte.
-     * @param b An unused parameter, used only for polymorphism.
-     * @return a random byte.
-     */
-    public static byte getRandom(byte b) {
-        byte[] tmp = new byte[1]; // TODO: Cache more...
-        _rand.nextBytes(tmp);
-        return tmp[0];
-    }
-
-
-    /**
-     * Returns true or false randomly with equal probability.
-     * @return true or false randomly with equal probability.
-     */
-    public static boolean flip() {
-        return _rand.nextBoolean();
-    }
-
-    /**
-     * Returns true randomly with the probability p.
-     *
-     * @param p A probability for returning true
-     * @return true p% of the time
-     */
-    public static boolean flip(double p) {
-        return (_rand.nextDouble() < p)? true : false;
-    }
-
-    /**
-     * Returns a random printable character from the {@link #PRINTABLE_CHAR}
-     * string.
-     *
-     * @return a random printable character from the PRINTABLE_CHAR string.
-     */
-    public static char rndPrintableChar() {
-        return PRINTABLE_CHAR.charAt(_rand.nextInt(PRINTABLE_CHAR.length()));
-    }
-
-    /**
-     * Returns the seed which was used to initialize the pseudo-random number
-     * generator.
-     *
-     * @return the seed which was used to initialize the pseudo-random number
-     *         generator
-     */
-    public static long getSeed() {
-        return _seed;
-    }
-
-    /**
-     * Re-initializes the random number generator with the given seed.
-     *
-     * @param seed the new seed for the random number generator.
-     */
-    public static void setSeed(long seed) {
-        _seed = seed;
-        _rand = new Random(_seed);
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/SchemaTestCase.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/SchemaTestCase.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/SchemaTestCase.java	(working copy)
@@ -1,265 +0,0 @@
-/*
- * Redistribution and use of this software and associated documentation
- * ("Software"), with or without modification, are permitted provided
- * that the following conditions are met:
- *
- * 1. Redistributions of source code must retain copyright
- *    statements and notices.  Redistributions must also contain a
- *    copy of this document.
- *
- * 2. Redistributions in binary form must reproduce the
- *    above copyright notice, this list of conditions and the
- *    following disclaimer in the documentation and/or other
- *    materials provided with the distribution.
- *
- * 3. The name "Exolab" must not be used to endorse or promote
- *    products derived from this Software without prior written
- *    permission of Intalio, Inc.  For written permission,
- *    please contact info@exolab.org.
- *
- * 4. Products derived from this Software may not be called "Exolab"
- *    nor may "Exolab" appear in their names without prior written
- *    permission of Intalio, Inc. Exolab is a registered
- *    trademark of Intalio, Inc.
- *
- * 5. Due credit should be given to the Exolab Project
- *    (http://www.exolab.org/).
- *
- * THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
- * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
- * INTALIO, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Copyright 2002-2003 (C) Intalio, Inc. All Rights Reserved.
- *
- * Portions of this file developed by Keith Visco after Jan 19 2005 are
- * Copyright (C) 2005 Keith Visco. All Rights Reserverd.
- *
- * $Id$
- *
- * Date         Author              Changes
- * -----------------------------------------
- * 01/23/2002   Keith Visco         Created
- * 03/25/2002   Arnaud Blandin      Ported to CTF
- * 10/15/2003   Arnaud Blandin      Improved reporting
- */
-package org.exolab.castor.tests.framework;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.PrintWriter;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.exolab.castor.tests.framework.testDescriptor.SchemaDifferences;
-import org.exolab.castor.tests.framework.testDescriptor.UnitTestCase;
-import org.exolab.castor.tests.framework.testDescriptor.types.FailureStepType;
-import org.exolab.castor.xml.schema.Schema;
-import org.exolab.castor.xml.schema.reader.SchemaReader;
-import org.exolab.castor.xml.schema.writer.SchemaWriter;
-
-/**
- * A JUnit test case for testing the Castor Schema Object Model.
- *
- * @author <a href="mailto:keith AT kvisco DOT com">Keith Visco</a>
- * @author <a href="mailto:blandin@intalio.com">Arnaud Blandin</a>
- * @version $Revision$ $Date: 2006-04-26 15:14:53 -0600 (Wed, 26 Apr 2006) $
- */
-public class SchemaTestCase extends XMLTestCase {
-
-    /** The name of the schema to test. */
-    private String         _schemaName;
-    /** The count of differences expected for the file-reference comparison. */
-    private final int      _differenceCountReference;
-    /** Gold file to compare a schema against.  Optional.  Only needed if
-     * schema changes during parsing, i.e., due to redefine element. */
-    protected final String _goldFileName;
-
-    /**
-     * Default constructor
-     * @param name the name of the test
-     */
-    public SchemaTestCase(final String name) {
-        super(name);
-        throw new IllegalArgumentException("You cannot use the name-only constructor");
-    } //-- SchemaTest
-
-    /**
-     * Creates a new SchemaTest with the given name
-     * @param castorTc the reference to the jar/directory
-     * @param tc the UnitTestCase that wraps the configuration for this XML Test case.
-     */
-    public SchemaTestCase(final CastorTestCase castorTc, final UnitTestCase tc) {
-        super(castorTc, tc);
-        _differenceCountReference = getSchemaDifferenceCount(tc, FailureStepType.COMPARE_TO_REFERENCE);
-        _goldFileName             = tc.getGoldFile();
-    } //-- SchemaTest
-
-    /**
-     * Looks for and returns the difference count for the given step
-     * @param tc the UnitTestCase that wraps the configuration for this XML Test case.
-     * @param step the step to look for
-     * @return the difference count for the given step
-     */
-    private int getSchemaDifferenceCount(final UnitTestCase tc, final FailureStepType step) {
-        SchemaDifferences[] diff = tc.getSchemaDifferences();
-        for (int i = 0; i < diff.length; i++) {
-            if (diff[i].getFailureStep().equals(step)) {
-                return diff[i].getContent().intValue();
-            }
-        }
-        return 0;
-    }
-
-    /**
-     * Sets the name of the XML schema file to test.
-     *
-     * @param name the name of the XML schema file to test.
-     */
-    public void setSchemaName(final String name) {
-        _schemaName = name;
-    }
-
-    public static Test suite() {
-        return new TestSuite();
-    } //-- suite
-
-    protected void setUp() throws Exception {
-        verbose("\n================================================");
-        verbose("Test suite '"+_test.getName()+"': setting up test '" + _name+"'");
-        verbose("================================================\n");
-
-        try {
-            FileServices.copySupportFiles(_test.getTestFile(), _outputRootFile);
-        } catch (IOException e) {
-            fail("IOException copying support files " + e);
-        }
-    }
-
-    /**
-     * Cleans up after this unit test (nothing to do except provide output).
-     * @throws java.lang.Exception never
-     */
-    protected void tearDown() throws Exception {
-        verbose("\n================================================");
-        verbose("Test suite '"+_test.getName()+"': test '" + _name+"' complete.");
-        verbose("================================================\n");
-    }
-
-    /**
-     * Override this method to run the test and assert its state.
-     *
-     * @throws Throwable if any exception is thrown
-     */
-    public void runTest() throws Throwable {
-        if (_skip) {
-            verbose("-->Skipping the test");
-            return;
-        }
-
-        File schemaFile = new File(_test.getTestFile() + "/" + _schemaName);
-        String schemaURL = schemaFile.toURL().toString();
-
-        Schema schema = testReadingSchema(schemaURL);
-        if (schema == null) {
-            return;
-        }
-        testWritingSchema(schemaURL, schema);
-
-        // Compare marshaled schema to gold file if provided, otherwise to input file
-        compareSchemaFiles(schemaFile);
-
-        if (_failure != null && _failure.getContent()) {
-            fail("The schema test was expected to fail, but passed");
-        }
-    } //-- runTest
-
-    private void compareSchemaFiles(final File schemaFile) throws IOException {
-        File file = new File(_outputRootFile, _schemaName.substring(0,_schemaName.lastIndexOf('.'))
-                              + "-output" + FileServices.XSD);
-
-        String goldFileName = (_goldFileName != null) ? _outputRootFile + "/" +  _goldFileName
-                                                      : schemaFile.getAbsolutePath();
-
-        int result = CTFUtils.compare(goldFileName, file.getAbsolutePath());
-        verbose("----> Compare marshaled schema to gold file '" + _goldFileName + "': " + ((result == 0)?"OK":"### Failed ### "));
-
-        final FailureStepType step = _failure != null ? _failure.getFailureStep() : null;
-        final boolean expectedToFail= _failure != null && _failure.getContent()
-                                      && (step == null || step.equals(FailureStepType.COMPARE_TO_REFERENCE));
-
-        if (_failure == null || !_failure.getContent()) {
-            assertEquals("The Marshaled schema differs from the gold file", _differenceCountReference, result);
-        } else if (expectedToFail) {
-            assertTrue("The Marshaled schema was expected to differ from the" +
-                       " gold file, but did not", result != _differenceCountReference);
-        }
-    }
-
-    /**
-     * Reads and returns the provided XML schema.
-     *
-     * @param url the schema URL
-     * @return the Schema that was read in
-     */
-    private Schema testReadingSchema(final String url) {
-        verbose("--> Reading XML Schema: " + url);
-        try {
-            SchemaReader reader = new SchemaReader(url);
-            Schema returnValue  = reader.read();
-            if (_failure != null && _failure.getContent() && _failure.getFailureStep() != null &&
-                 _failure.getFailureStep().equals(FailureStepType.PARSE_SCHEMA)) {
-                fail("Reading/Parsing the schema was expected to fail, but succeeded");
-            }
-            return returnValue;
-        } catch (Exception e) {
-            if (!checkExceptionWasExpected(e, FailureStepType.PARSE_SCHEMA)) {
-                fail("Unable to read Schema '" + url + "': " + e.toString());
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Writes the provided schema to disk.
-     *
-     * @param url schema url, used only in diagnostic output
-     * @param schema the schema to write
-     */
-    private void testWritingSchema(final String url, final Schema schema) {
-        // First write the schema to disk
-        try {
-            String fileName = _schemaName.substring(0,_schemaName.lastIndexOf('.'))
-                              + "-output" + FileServices.XSD;
-            verbose("--> Writing XML Schema: " + fileName);
-
-            File         output = new File(_outputRootFile, fileName);
-            FileWriter   writer = new FileWriter(output);
-            SchemaWriter sw     = new SchemaWriter(new PrintWriter(writer, true));
-            sw.write(schema);
-            writer.close();
-        } catch (Exception e) {
-            if (!checkExceptionWasExpected(e, FailureStepType.WRITE_SCHEMA)) {
-                fail("Failed to write Schema '" + url + "' to disk: " + e.toString());
-            }
-            return;
-        }
-
-        if (_failure != null && _failure.getContent() && _failure.getFailureStep() != null &&
-            _failure.getFailureStep().equals(FailureStepType.WRITE_SCHEMA)) {
-            fail("Writing the schema was expected to fail, but succeeded");
-        }
-    }
-
-} //-- SchemaTest
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/SourceGeneratorTestCase.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/SourceGeneratorTestCase.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/SourceGeneratorTestCase.java	(working copy)
@@ -1,160 +0,0 @@
-/*
- * Redistribution and use of this software and associated documentation
- * ("Software"), with or without modification, are permitted provided
- * that the following conditions are met:
- *
- * 1. Redistributions of source code must retain copyright
- *    statements and notices.  Redistributions must also contain a
- *    copy of this document.
- *
- * 2. Redistributions in binary form must reproduce the
- *    above copyright notice, this list of conditions and the
- *    following disclaimer in the documentation and/or other
- *    materials provided with the distribution.
- *
- * 3. The name "Exolab" must not be used to endorse or promote
- *    products derived from this Software without prior written
- *    permission of Intalio, Inc.  For written permission,
- *    please contact info@exolab.org.
- *
- * 4. Products derived from this Software may not be called "Exolab"
- *    nor may "Exolab" appear in their names without prior written
- *    permission of Intalio, Inc. Exolab is a registered
- *    trademark of Intalio, Inc.
- *
- * 5. Due credit should be given to the Exolab Project
- *    (http://www.exolab.org/).
- *
- * THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
- * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
- * INTALIO, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Copyright 2001-2003 (C) Intalio, Inc. All Rights Reserved.
- *
- * $Id$
- */
-package org.exolab.castor.tests.framework;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.exolab.castor.tests.framework.testDescriptor.RootType;
-import org.exolab.castor.tests.framework.testDescriptor.SourceGeneratorTest;
-import org.exolab.castor.tests.framework.testDescriptor.UnitTestCase;
-
-/**
- * This class encapsulate all the logic to run the tests patterns for the source
- * generator. It is able to run the source generator by itself and then compile
- * the file that have been generated.
- *
- * @author <a href="mailto:blandin@intalio.com">Arnaud Blandin</a>
- * @author <a href="mailto:gignoux@kernelcenter.org">Sebastien Gignoux</a>
- * @version $Revision$ $Date: 2005-02-28 17:22:46 -0700 (Mon, 28 Feb 2005) $
- */
-public class SourceGeneratorTestCase extends XMLTestCase {
-
-    /** Contains the information for the configuration for all the tests in this jar. */
-    protected final SourceGeneratorTest _sourceGenConf;
-    /** If true, the randomize() function has been implemented in the root class. */
-    protected final boolean             _hasRandom;
-    /** Generates and compiles source in a test harness, but does nothing else. */
-    private final TestSourceGenerator   _sourceGenerator;
-
-    /**
-     * Creates a new test case for the given setup.
-     *
-     * @param test the reference to the jar/directory
-     * @param unit the UnitTestCase that wraps the configuration for this XML
-     *            Test case.
-     * @param sourceGen the Source Generator test to be executed
-     */
-    public SourceGeneratorTestCase(final CastorTestCase test, final UnitTestCase unit,
-                                   final SourceGeneratorTest sourceGen) {
-        super(test, unit);
-        _sourceGenConf   = sourceGen;
-        _sourceGenerator = new TestSourceGenerator(test, unit, sourceGen);
-
-        RootType rootType = _sourceGenConf.getRoot_Object();
-        if (rootType == null) {
-            throw new IllegalArgumentException("You must give a root object for a Source Generator Test"
-                    + _outputRootFile + ", " +  getName());
-        }
-
-        _rootClassName    = rootType.getContent();
-        if (_rootClassName == null) {
-            throw new IllegalArgumentException("You must give a root object for a Source Generator Test"
-                    + _outputRootFile + ", " +  getName());
-        }
-
-        _hasRandom = rootType.getRandom();
-        _hasDump   = rootType.getDump();
-    }
-
-    /**
-     * Create a new SourceGeneratorTestCase with the given name.
-     * @param name name for the test case
-     */
-    public SourceGeneratorTestCase(final String name) {
-        super(name);
-        throw new IllegalArgumentException("You cannot use the name-only constructor");
-    }
-
-    /**
-     * Returns the test suite for this given test setup.
-     * @return the test suite for this given test setup.
-     */
-    public Test suite() {
-        TestSuite suite  = new TestSuite(_name);
-
-        String name = getTestSuiteName();
-        name = (name != null) ? name + "#" + _name : _name;
-        if (_unitTest.getCustomTest() != null) {
-            suite.addTest(new TestWithCustomTest(name, this));
-        } else {
-            suite.addTest(new TestWithReferenceDocument(name, this));
-            if (_hasRandom) {
-                suite.addTest(new TestWithRandomObject(name, this));
-            }
-        }
-
-        return suite;
-    }
-
-    /**
-     * Sets up this test suite.
-     * @throws java.lang.Exception if anything goes wrong
-     */
-    protected void setUp() throws java.lang.Exception {
-        verbose("\n================================================");
-        verbose("Test suite '"+_test.getName()+"': setting up test '" + _name+"'");
-        verbose("================================================\n");
-
-        // Set up and run the source generator so we can test using the generated source
-        _sourceGenerator.setUp();
-        _sourceGenerator.runTest();
-
-        // Set up the root class
-        _rootClass = _test.getClassLoader().loadClass(_rootClassName);
-    }
-
-    /**
-     * Cleans up after this unit test (nothing to do except provide output).
-     * @throws java.lang.Exception never
-     */
-    protected void tearDown() throws java.lang.Exception {
-        verbose("\n================================================");
-        verbose("Test suite '"+_test.getName()+"': test '" + _name+"' complete.");
-        verbose("================================================\n");
-        _sourceGenerator.tearDown();
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/SunJavaCompiler.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/SunJavaCompiler.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/SunJavaCompiler.java	(working copy)
@@ -1,166 +0,0 @@
-/*
- * Copyright 2006 Ralf Jaochim
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.exolab.castor.tests.framework;
-
-import java.io.File;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-
-/**
- * Compiles a directory tree, recursively. This class is built to use the Sun Javac
- * compiler contained in tools.jar. A IllegalStateException will be thrown if tools.jar
- * is not on the classpath at construction of the class and execution of the
- * compileDirectory() method.
- *
- * @author <a href="mailto:ralf DOT joachim AT syscon-world DOT de">Ralf Joachim</a>
- * @version $Revision: 5951 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
- * @since 1.0.5
- */
-public class SunJavaCompiler implements Compiler {
-    private static final String COMPILE_CLASSNAME = "com.sun.tools.javac.Main";
-    private static final String COMPILE_METHODNAME = "compile";
-    private static final Class[] COMPILE_PARAMTYPE = new Class[] {String[].class};
-
-    private static final HashSet IGNORE_DIRS = new HashSet();
-
-    private static Method _compileMethod = null;
-    private static boolean _initialized = false;
-    /** Java version of the JVM we are running in. */
-    private static final float JAVA_VERSION = Float.parseFloat(System.getProperty("java.specification.version"));
-
-    private String _javaVersion = null;
-
-    private final File _baseDirectory;
-    private final File _outputDirectory;
-
-    /**
-     * Creates a compiler for a given directory.
-     * @param baseDirectory The directory that holds the files to be compiled.
-     */
-    public SunJavaCompiler(final File baseDirectory) {
-        if (baseDirectory == null) {
-            throw new IllegalArgumentException("'baseDirectory' must not be null.");
-        }
-        _baseDirectory   = baseDirectory;
-        _outputDirectory = baseDirectory;
-
-        if (!_initialized) { initialize(); }
-    }
-
-    public void setJavaSourceVersion(float javaSourceVersion) {
-        if (javaSourceVersion >= 5F && javaSourceVersion < 10F) {
-            javaSourceVersion = 1.0F + (javaSourceVersion / 10F);
-        }
-        _javaVersion = "" + javaSourceVersion;
-    }
-
-    private void initialize() {
-        IGNORE_DIRS.add(FileServices.CVS);
-        IGNORE_DIRS.add(FileServices.SVN);
-
-        try {
-            ClassLoader loader = this.getClass().getClassLoader();
-            Class cls = loader.loadClass(COMPILE_CLASSNAME);
-            _compileMethod = cls.getMethod(COMPILE_METHODNAME, COMPILE_PARAMTYPE);
-        } catch (Exception ex) {
-            throw new IllegalStateException("Failed to find compile method.");
-        }
-
-        _initialized = true;
-    }
-
-    /**
-     * Compiles the content of a directory. Throws a <code>CompilationException</code>
-     * if the build fails.
-     */
-    public void compileDirectory() {
-        List filesList = findSourceFiles(_baseDirectory);
-        if (filesList.size() > 0) {
-            filesList.addAll(0, getCompileArguments(_baseDirectory, _outputDirectory));
-
-            String[] args = new String[filesList.size()];
-            args = (String[]) filesList.toArray(args);
-
-            int status;
-            try {
-                Object result = _compileMethod.invoke(null, new Object[] {args});
-                status = ((Integer) result).intValue();
-            } catch (Exception ex) {
-                throw new IllegalStateException("Failed to call compile method.");
-            }
-
-            switch (status) {
-            case 0: break;
-            case 1: throw new CompilationException("Compile status: ERROR");
-            case 2: throw new CompilationException("Compile status: CMDERR");
-            case 3: throw new CompilationException("Compile status: SYSERR");
-            case 4: throw new CompilationException("Compile status: ABNORMAL");
-            default: throw new CompilationException("Compile status: Unknown");
-            }
-        } else {
-            throw new CompilationException("No files to compile: " + _baseDirectory);
-        }
-    }
-
-    private List getCompileArguments(final File srcDir, final File destDir) {
-        List args = new ArrayList();
-
-        args.add("-g");
-        if (JAVA_VERSION == 1.5F) {
-            args.add("-Xlint:unchecked");
-        }
-        if (XMLTestCase._verbose) {
-            args.add("-verbose");
-        } else {
-            args.add("-nowarn");
-            args.add("-Xmaxwarns");
-            args.add("0");
-            args.add("-Xmaxerrs");
-            args.add("5");
-        }
-        if (_javaVersion != null) {
-            args.add("-source");
-            args.add(_javaVersion);
-        }
-        args.add("-classpath");
-        args.add(System.getProperty("java.class.path") + ";" + destDir.getAbsolutePath());
-        args.add("-d");
-        args.add(destDir.getAbsolutePath());
-        args.add("-sourcepath");
-        args.add(srcDir.getAbsolutePath());
-
-        return args;
-    }
-
-    private List findSourceFiles(final File srcDir) {
-        List files = new ArrayList();
-
-        File[] entries = srcDir.listFiles();
-        for (int i = 0; i < entries.length; i++) {
-            File entry = entries[i];
-            if (entry.getName().endsWith(".java")) {
-                files.add(entry.getAbsolutePath());
-            } else if (entry.isDirectory() && !IGNORE_DIRS.contains(entry.getName())) {
-                files.addAll(findSourceFiles(entry));
-            }
-        }
-
-        return files;
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/TestCaseAggregator.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/TestCaseAggregator.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/TestCaseAggregator.java	(working copy)
@@ -1,218 +0,0 @@
-/*
- * Redistribution and use of this software and associated documentation
- * ("Software"), with or without modification, are permitted provided
- * that the following conditions are met:
- *
- * 1. Redistributions of source code must retain copyright
- *    statements and notices.  Redistributions must also contain a
- *    copy of this document.
- *
- * 2. Redistributions in binary form must reproduce the
- *    above copyright notice, this list of conditions and the
- *    following disclaimer in the documentation and/or other
- *    materials provided with the distribution.
- *
- * 3. The name "Exolab" must not be used to endorse or promote
- *    products derived from this Software without prior written
- *    permission of Intalio, Inc.  For written permission,
- *    please contact info@exolab.org.
- *
- * 4. Products derived from this Software may not be called "Exolab"
- *    nor may "Exolab" appear in their names without prior written
- *    permission of Intalio, Inc. Exolab is a registered
- *    trademark of Intalio, Inc.
- *
- * 5. Due credit should be given to the Exolab Project
- *    (http://www.exolab.org/).
- *
- * THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
- * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
- * INTALIO, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Copyright 2001-2002 (C) Intalio, Inc. All Rights Reserved.
- *
- * $Id$
- */
-package org.exolab.castor.tests.framework;
-
-import java.io.File;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * This class is used to inspect recursively a hierarchy of directories that
- * contain CTF tests (jars or directories). A JUnit TestSuite is created for
- * each directory.
- *
- * @author <a href="mailto:gignoux@kernelcenter.org">Sebastien Gignoux</a>
- * @author <a href="mailto:blandin@intalio.com">Arnaud Blandin</a>
- * @version $Revision$ $Date: 2006-04-26 15:14:53 -0600 (Wed, 26 Apr 2006) $
- */
-public class TestCaseAggregator extends TestCase {
-
-    /** File separator for this system. */
-    private static final String FILE_SEPARATOR = System.getProperty("file.separator");
-    /** Name of the system property to set up the verbose mode. */
-    public static final String VERBOSE_PROPERTY = "org.exolab.castor.tests.Verbose";
-    /** Name of the system property to set up the printStackTrace mode. */
-    public static final String PRINT_STACK_TRACE = "org.exolab.castor.tests.printStack";
-    /** True if we desire a lot of info on what happen. */
-    private static boolean _verbose;
-
-    static {
-        String v = System.getProperty(VERBOSE_PROPERTY);
-        _verbose = (v != null && v.equals("true"));
-    }
-
-    /** The directory that contains CTF test cases. */
-    private final File _directory;
-    /** Location of the temporary files when the tests are run. */
-    private final String _testOutputRoot;
-    /** String containing the directory path from the test root to here. */
-    private final String _directoryToHere;
-
-    /**
-     * Creates a new TestCaseAggregator with the given name.
-     *
-     * @param name the name of this TestCaseAggregator
-     */
-    public TestCaseAggregator(final String name) {
-        super(name);
-        _directory       = null;
-        _directoryToHere = null;
-        _testOutputRoot  = null;
-    }
-
-    /**
-     * Create a new TestCaseAggregator which will inspect the directory given in
-     * parameter.
-     *
-     * @param directory the directory to inspect for test case and subdirectory
-     * @param testOutputRoot the path to the directory where the test in this
-     *            directory can put there temporary files.
-     */
-    public TestCaseAggregator(final File directory, final String testOutputRoot) {
-        super(directory.getName());
-        _directory       = directory;
-        _directoryToHere = "";
-        _testOutputRoot  = testOutputRoot;
-    }
-
-    /**
-     * Create a new TestCaseAggregator which will inspect the directory given in
-     * parameter.
-     *
-     * @param directory the directory to inspect for test case and subdirectory
-     * @param testOutputRoot the path to the directory where the test in this
-     *            directory can put there temporary files.
-     */
-    protected TestCaseAggregator(final File directory, final String directoryToHere,
-                                 final String testOutputRoot) {
-        super(directory.getName());
-        _directory       = directory;
-        _directoryToHere = directoryToHere + "/";
-        _testOutputRoot  = testOutputRoot;
-    }
-
-    /**
-     * Assembles and returns a test suite containing all known tests.
-     *
-     * @return A non-null test suite.
-     */
-    public Test suite() {
-        final TestSuite suite = new TestSuite();
-        final String suiteName = (_directoryToHere.length() == 0) ? _directory.getName() : _directoryToHere;
-        suite.setName(suiteName);
-
-        if (!_directory.isDirectory()) {
-            // Maybe it is a jar file, it happens if we run the
-            // CastorTestSuiteRunner with just one jar in param
-            if (_directory.getName().endsWith(".jar")) {
-                CastorTestCase tc = new CastorTestCase(_directory, _directoryToHere, _testOutputRoot);
-                return tc.suite();
-            }
-            // If not a jar file, just return the empty TestSuite
-            return suite;
-        }
-
-        String outputRoot = _testOutputRoot;
-        if ( outputRoot.endsWith("/") || outputRoot.endsWith(FILE_SEPARATOR)) {
-            outputRoot = outputRoot + _directory.getName();
-        } else {
-            outputRoot = outputRoot + FILE_SEPARATOR + _directory.getName();
-        }
-
-        verbose("\n==================================================================");
-        verbose("Processing directory:\n"+_directory.getAbsolutePath());
-        verbose("==================================================================\n");
-
-        final File[] list = _directory.listFiles();
-        for (int i = 0; i < list.length; ++i) {
-            processOneFileOrDirectory(suite, outputRoot, list[i]);
-        }
-
-        return suite;
-    }
-
-    /**
-     * Processes a single file or directory, recurses into directories and for
-     * files, if a JAR file or a test descriptor XML file, create a new test
-     * case and add it to our test suite.
-     *
-     * @param suite the test suite to add new tests to
-     * @param outputRoot output directory for temporary files in our tests
-     * @param file the file or directory to process
-     */
-    private void processOneFileOrDirectory(final TestSuite suite, final String outputRoot,
-                                           final File file) {
-        String name = file.getName();
-
-        // If a directory (and not a source control directory), recurse
-        if (file.isDirectory()) {
-            // Directories that contain TestDescriptor.xml do not get recursed any deeper
-            if (!FileServices.isScmDirectory(name) && !((new File(file.getParentFile(), "TestDescriptor.xml")).exists())) {
-                //look for jars or testDescriptor files inside the directory
-                Test test = new TestCaseAggregator(file, _directoryToHere + file.getName(), outputRoot).suite();
-                if (test != null) {
-                    suite.addTest(test);
-                }
-            }
-            return;
-        }
-
-        // Otherwise make a test case if a JAR file or test descriptor
-
-        Test test = null;
-        if (name.endsWith(".jar")) {
-            test = (new CastorTestCase(file, _directoryToHere, outputRoot)).suite();
-        } else if (name.endsWith(CastorTestCase.TEST_DESCRIPTOR)) {
-            test = (new CastorTestCase(_directory, _directoryToHere, outputRoot)).suite();
-        }
-
-        if (test != null) {
-            suite.addTest(test);
-        }
-    }
-
-    /**
-     * Prints the provided message if verbose is true
-     * @param message the message to print
-     */
-    private void verbose(final String message) {
-        if (_verbose) {
-            System.out.println(message);
-        }
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/TestSourceGenerator.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/TestSourceGenerator.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/TestSourceGenerator.java	(working copy)
@@ -1,232 +0,0 @@
-/*
- * Copyright 2006 Edward Kuns
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: TestSourceGenerator.java 0000 2006-10-25 00:00:00Z ekuns $
- */
-package org.exolab.castor.tests.framework;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Properties;
-
-import org.exolab.castor.builder.FieldInfoFactory;
-import org.exolab.castor.builder.SourceGenerator;
-import org.exolab.castor.tests.framework.testDescriptor.OnlySourceGenerationTest;
-import org.exolab.castor.tests.framework.testDescriptor.SourceGeneratorTest;
-import org.exolab.castor.tests.framework.testDescriptor.UnitTestCase;
-import org.exolab.castor.tests.framework.testDescriptor.types.FailureStepType;
-import org.xml.sax.InputSource;
-
-/**
- * This class encapsulate all the logic needed to run the source generator by
- * itself and then compile the file that have been generated. This class does
- * not do anything additional. It only runs the source generator and ensures
- * that the generated source will compile without error.
- *
- * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a>
- * @version $Revision: 0000 $ $Date: $
- */
-public class TestSourceGenerator extends XMLTestCase {
-
-    /** Name of the property file to use, null if none. */
-    private final String   _propertyFileName;
-    /** Name of the collection to use by default, null if we rely on the default behavior. */
-    private final String   _fieldInfoFactoryName;
-    /** Name of the binding file. */
-    private final String   _bindingFileName;
-    /** Array of schemas we'll process. */
-    private final String[] _schemas;
-    /** Package name for generated source. */
-    private final String   _package;
-    /** Should we generate source from imported schemas? */
-    private final boolean  _genFromImported;
-
-    public TestSourceGenerator(final CastorTestCase test, final UnitTestCase unit, final OnlySourceGenerationTest sourceGen) {
-        super(test, unit);
-        _propertyFileName     = sourceGen.getProperty_File();
-        _fieldInfoFactoryName = sourceGen.getCollection().toString();
-        _bindingFileName      = sourceGen.getBindingFile();
-        _schemas              = sourceGen.getSchema();
-        _package              = sourceGen.getPackage();
-        _genFromImported      = unit.hasGenerateImported() && unit.getGenerateImported();
-    }
-
-    public TestSourceGenerator(final CastorTestCase test, final UnitTestCase unit, final SourceGeneratorTest sourceGen) {
-        super(test, unit);
-        _propertyFileName     = sourceGen.getProperty_File();
-        _fieldInfoFactoryName = sourceGen.getCollection().toString();
-        _bindingFileName      = sourceGen.getBindingFile();
-        _schemas              = sourceGen.getSchema();
-        _package              = sourceGen.getPackage();
-        _genFromImported      = unit.hasGenerateImported() && unit.getGenerateImported();
-    }
-
-    /**
-     * Sets up this test suite.
-     * @throws java.lang.Exception if anything goes wrong
-     */
-    protected void setUp() throws java.lang.Exception {
-        try {
-            FileServices.copySupportFiles(_test.getTestFile(), _outputRootFile);
-        } catch (IOException e) {
-            fail("IOException copying support files " + e);
-        }
-    }
-
-    /**
-     * Cleans up after this unit test.
-     * @throws java.lang.Exception if anything goes wrong
-     */
-    protected void tearDown() throws java.lang.Exception {
-        // Nothing to do
-    }
-
-    /**
-     * Runs our source generation test. Creates, configures, and executes the
-     * source generator on each schema we have to test. Compiles the generated
-     * code. Loads classes via the appropriate class loader.
-     */
-    public void runTest() {
-        if (_skip) {
-            verbose("-->Skipping the test");
-            return;
-        }
-
-        // 1. Run the source generator
-        verbose("-->Running the source generator");
-
-        try {
-            final SourceGenerator sourceGen = createSourceGenerator();
-
-            for (int i=0; i<_schemas.length; i++) {
-                String schemaName = _schemas[i];
-                File   schemaFile = new File(_outputRootFile, schemaName);
-
-                if (!schemaFile.exists()) {
-                    assertNotNull("Unable to find the schema: ", schemaName);
-                }
-
-                InputSource source = new InputSource(new FileReader(schemaFile));
-                source.setSystemId(schemaFile.getAbsolutePath());
-                sourceGen.generateSource(source, _package);
-            }
-        } catch (Exception e) {
-            if (!checkExceptionWasExpected(e, FailureStepType.SOURCE_GENERATION)) {
-                fail("Source Generator threw an Exception: " + e.getMessage());
-            }
-            return;
-        }
-
-        if (_failure != null && _failure.getContent() && _failure.getFailureStep() != null &&
-            _failure.getFailureStep().equals(FailureStepType.SOURCE_GENERATION)) {
-            fail("Source Generator was expected to fail, but succeeded");
-            return;
-        }
-
-        // 2. Compile the files generated by the source generator
-        verbose("-->Compiling the files in " + _outputRootFile);
-        try {
-            Compiler compiler = new SunJavaCompiler(_outputRootFile);
-            if (_unitTest.hasJavaSourceVersion()) {
-                compiler.setJavaSourceVersion(_unitTest.getJavaSourceVersion());
-            }
-            compiler.compileDirectory();
-        } catch (CompilationException e) {
-            if (!checkExceptionWasExpected(e, FailureStepType.SOURCE_COMPILATION)) {
-                fail("Compiling generated source failed: " + e.getMessage());
-            }
-            return;
-        }
-
-        if (_failure != null && _failure.getContent() && _failure.getFailureStep() != null &&
-            _failure.getFailureStep().equals(FailureStepType.SOURCE_COMPILATION)) {
-            fail("Compilation was expected to fail, but succeeded");
-            return;
-        }
-
-        // 3. Nest the class loader to look into the tmp dir (don't forget previous path)
-        verbose("-->Set up the class loader");
-        try {
-            URL[] urlList = {_test.getTestFile().toURL(), _outputRootFile.toURL()};
-            ClassLoader loader =  new URLClassLoader(urlList, _test.getClass().getClassLoader());
-            _test.setClassLoader(loader);
-        } catch (Exception e) {
-            if (!checkExceptionWasExpected(e, FailureStepType.LOAD_GENERATED_CLASSES)) {
-                fail("Unable to process the test case:" + e);
-            }
-            return;
-        }
-
-        if (_failure != null && _failure.getContent() && _failure.getFailureStep() != null &&
-            _failure.getFailureStep().equals(FailureStepType.LOAD_GENERATED_CLASSES)) {
-            fail("Loading the generated classes was expected to fail, but succeeded");
-        }
-    }
-
-    /**
-     * Creates and provides initial configuration for our Source Generator.
-     *
-     * @return a new SourceGenerator configured for out test
-     * @throws IOException
-     *             if any IOException occurs preparing the source generator.
-     */
-    private SourceGenerator createSourceGenerator() throws IOException {
-        // Create our source generator
-        final SourceGenerator sourceGen;
-        if (_fieldInfoFactoryName != null) {
-            FieldInfoFactory factory = new FieldInfoFactory(_fieldInfoFactoryName);
-            sourceGen = new SourceGenerator(factory);
-        } else {
-            sourceGen = new SourceGenerator();
-        }
-
-        // Do we have a castorbuilder.properties file?
-        if (_propertyFileName != null) {
-            Properties prop = new Properties();
-            prop.load(_test.getClassLoader().getResourceAsStream(_propertyFileName));
-            sourceGen.setDefaultProperties(prop);
-        } else {
-            //don't forget to reset the properties
-            sourceGen.setDefaultProperties(null);
-        }
-
-        // Do we have a binding file?
-        if (_bindingFileName != null && _bindingFileName.length() >0) {
-            File bindingFile = new File(_outputRootFile, _bindingFileName);
-
-            if ( !bindingFile.exists()) {
-                fail("Unable to find the specified binding file: " + _bindingFileName);
-            }
-
-            verbose("using binding file: " + bindingFile.getAbsolutePath());
-            InputSource source = new InputSource(new FileReader(bindingFile));
-            source.setSystemId(bindingFile.getAbsolutePath());
-            sourceGen.setBinding(source);
-        }
-
-        // Final configuration of our source generator
-        sourceGen.setEqualsMethod(true);
-        sourceGen.setTestable(true);
-        sourceGen.setSuppressNonFatalWarnings(true);
-        sourceGen.setFailOnFirstError(true);
-        sourceGen.setGenerateImportedSchemas(_genFromImported);
-        sourceGen.setDestDir(_outputRootFile.getAbsolutePath());
-        return sourceGen;
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/TestWithCustomTest.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/TestWithCustomTest.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/TestWithCustomTest.java	(working copy)
@@ -1,205 +0,0 @@
-/*
- * Copyright 2006 Edward Kuns
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: TestWithCustomTest.java 0000 2006-10-19 22:00:00Z ekuns $
- */
-package org.exolab.castor.tests.framework;
-
-import java.util.Iterator;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.exolab.castor.tests.framework.testDescriptor.ConfigurationType;
-import org.exolab.castor.tests.framework.testDescriptor.CustomTest;
-import org.exolab.castor.tests.framework.testDescriptor.FailureType;
-import org.exolab.castor.tests.framework.testDescriptor.types.FailureStepType;
-
-/**
- * Implements a test case that tests code written by the XML source generator.
- * This class uses a user-provided test class to test the generated source.
- * <p>
- * Each user-provided test is allowed to return a Boolean, either a primitive or
- * a java.lang.Boolean -- it does not matter. If the user-provided test returns
- * a Boolean and it is false, then the test is considered to have failed. If the
- * user-provided test throws <i>or returns</i> a Throwable, it is considered to
- * have failed. If the user-provided test returns <b>anything else</b>
- * (including void) then the test is considered to have passed.
- * <p>
- * Note: Returning Throwable is a little bit cleaner than throwing an Exception,
- * but either is acceptable as a sign of test failure. This is because when a
- * Throwable is returned, if -printStack is in effect, then the CORRECT stack
- * trace can be displayed and not a stack dump from the refective invocation.
- * <p>
- * There is no requirement that the user-provided test implement any interface,
- * nor any requirement that the user-provided test return anything at all.
- * However, a test that returns "void" and that never throws an Exception is not
- * a very useful test as it can never fail.
- *
- * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a>
- * @version $Revision: 0000 $ $Date: $
- */
-class TestWithCustomTest extends TestCase {
-    /** We add this fixed string to the end of our testcase name. */
-    private static final String CUSTOM = "_CustomTest";
-
-    /** We delegate all actions to this test case. */
-    private final XMLTestCase   _delegate;
-
-    /** The failure object that is not null is the test intends to fail. */
-    protected final FailureType _failure;
-    /** True if the test is supposed to return failure or throw an Exception. */
-    protected final boolean     _failureExpected;
-
-    /**
-     * Blank constructor for this test case. This contructor is not useful,
-     * since no delegate test case is provided.
-     *
-     * @param name
-     *            Name of our delegate test case
-     */
-    TestWithCustomTest(final String name) {
-        super(name + CUSTOM);
-        throw new IllegalArgumentException("You cannot use the name-only constructor");
-    }
-
-    /**
-     * Constructs a test case that when invoked will delegate to the provided
-     * test case.
-     * @param name Name of our delegate test case
-     * @param tc
-     */
-    TestWithCustomTest(final String name, final XMLTestCase tc) {
-        super(name + CUSTOM);
-        _delegate        = tc;
-        _failure         = tc._failure;
-        _failureExpected = _failure != null && _failure.getContent();
-    }
-
-    /**
-     * Provides setup for our delegated test case, depending on the type of
-     * test case we are delegating for.
-     * @throws Exception if anything goes wrong during setup
-     */
-    protected void setUp() throws Exception {
-        if (_delegate instanceof MarshallingFrameworkTestCase) {
-            ((MarshallingFrameworkTestCase)_delegate).setUp();
-        } else if (_delegate instanceof SourceGeneratorTestCase) {
-            ((SourceGeneratorTestCase)_delegate).setUp();
-        }
-    }
-
-    /**
-     * Provides tear down for our delegated test case, depending on the type of
-     * test case we are delegating for.
-     * @throws Exception if anything goes wrong during teardown
-     */
-    protected void tearDown() throws Exception {
-        if (_delegate instanceof MarshallingFrameworkTestCase) {
-            ((MarshallingFrameworkTestCase)_delegate).tearDown();
-        } else if (_delegate instanceof SourceGeneratorTestCase) {
-            ((SourceGeneratorTestCase)_delegate).tearDown();
-        }
-    }
-
-    /**
-     * Runs our test case using our delegate object where necessary.
-     * @throws Exception when anything goes wrong (this is temporary)
-     */
-    public void runTest() {
-        verbose("\n------------------------------");
-        verbose("Run the custom test case");
-        verbose("------------------------------\n");
-        if (_delegate._skip) {
-            verbose("-->Skipping the test");
-            return;
-        }
-
-        List returnValues = null;
-
-        try {
-            CustomTest customTest = _delegate._unitTest.getCustomTest();
-            ConfigurationType testConfig = customTest.getMethods();
-            Object object = getTestObject(customTest.getTestClass());
-            returnValues = _delegate.invokeEnumeratedMethods(object, testConfig);
-        } catch (Exception e) {
-            if (!_delegate.checkExceptionWasExpected(e, FailureStepType.CUSTOM_TEST)) {
-                fail("Exception running the custom test " + e);
-            }
-            return;
-        }
-
-        // Loop over all our return values ... any FALSE or Throwable means a failure
-        int count = 0;
-        boolean testFailed = false;
-
-        for (Iterator i = returnValues.iterator(); i.hasNext(); count++) {
-            Object o = i.next();
-
-            // If this test returned false and we DID NOT expect to fail, error!!!
-            if (o instanceof Boolean && !((Boolean)o).booleanValue() && !_failureExpected) {
-                // Mark failure, complain, but keep checking so we give ALL complaints
-                testFailed = true;
-                System.out.println("Custom test #" + count + " was expected to succeed, but returned false");
-            }
-
-            // If this test *returned* (not threw) an Exception, consider that a failure
-            if (o instanceof Throwable && !_failureExpected) {
-                testFailed = true;
-                System.out.println("Custom test #" + count + " was expected to succeed, but returned Throwable");
-                if (XMLTestCase._printStack) {
-                    ((Throwable)o).printStackTrace();
-                }
-            }
-        }
-
-        // Did we fail to meet our expected result, either success or failure?
-        if (testFailed ^ _failureExpected) {
-            if (testFailed) {
-                fail("The custom test failed");
-            } else {
-                fail("The custom test was expected to fail, but succeeded");
-            }
-        }
-    }
-
-    /**
-     * Gets an instance of our test object, as configured.
-     * @param testClassName name of the test class
-     * @return an instance of our test object
-     * @throws ClassNotFoundException when the test object's class cannot be found
-     * @throws IllegalAccessException when the test object's constructor is private or protected
-     * @throws InstantiationException when the test object is abstract or an interface
-     */
-    protected Object getTestObject(final String testClassName) throws ClassNotFoundException,
-                                                 IllegalAccessException, InstantiationException {
-        Class testObject = null;
-        if (_delegate._test.getClassLoader() != null) {
-            testObject = _delegate._test.getClassLoader().loadClass(testClassName);
-        } else {
-            testObject = this.getClass().getClassLoader().loadClass(testClassName);
-        }
-        return testObject.newInstance();
-    }
-
-    /**
-     * print the message if in verbose mode.
-     * @param message the message to print
-     */
-    private void verbose(final String message) {
-        _delegate.verbose(message);
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/TestWithRandomObject.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/TestWithRandomObject.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/TestWithRandomObject.java	(working copy)
@@ -1,203 +0,0 @@
-/*
- * Copyright 2006 Edward Kuns
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: TestWithRandomDocument.java 0000 2006-10-19 22:00:00Z ekuns $
- */
-package org.exolab.castor.tests.framework;
-
-import java.io.File;
-import java.io.FileWriter;
-
-import junit.framework.TestCase;
-
-import org.exolab.castor.tests.framework.testDescriptor.FailureType;
-import org.exolab.castor.tests.framework.testDescriptor.types.FailureStepType;
-
-/**
- * Implements a test case that tests code written by the XML source generator.
- * This class uses the generated source to write a randomly generated XML
- * element to a file.
- * <p>
- * The test follows this sequence:
- * <ol>
- *   <li>Instantiates a random object model using the randomize function.</li>
- *   <li>Marshals it to a file.</li>
- *   <li>Unmarshals the created file.</li>
- *   <li>Check that the result object is equal to the start object.</li>
- * </ol>
- *
- * @author <a href="mailto:gignoux@kernelcenter.org">Sebastien Gignoux</a>
- * @author <a href="mailto:blandin@intalio.com">Arnaud Blandin</a>
- * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a>
- * @version $Revision: 0000 $ $Date: $
- */
-class TestWithRandomObject extends TestCase {
-    /** We add this fixed string to the end of our testcase name. */
-    private static final String RANDOM = "_RandomObject";
-
-    /** We delegate all actions to this test case. */
-    private final XMLTestCase   _delegate;
-
-    /** The failure object that is not null is the test intends to fail. */
-    protected final FailureType _failure;
-    /** File name of our marshaled output. */
-    protected final String      _outputName;
-
-    /**
-     * Blank constructor for this test case.  This contructor is not useful, since
-     * no delegate test case is provided
-     * @param name Name of our delegate test case
-     */
-    TestWithRandomObject(String name) {
-        super(name+RANDOM);
-        throw new IllegalArgumentException("You cannot use the name-only constructor");
-    }
-
-    /**
-     * Constructs a test case that when invoked will delegate to the provided
-     * test case.
-     * @param name Name of our delegate test case
-     * @param tc
-     */
-    TestWithRandomObject(String name, XMLTestCase tc) {
-        super(name+RANDOM);
-        _delegate   = tc;
-        _failure    = tc._failure;
-        _outputName = _delegate._name.replace(' ', '_') + "-testWithRandomObject";
-    }
-
-    /**
-     * Provides setup for our delegated test case, depending on the type of
-     * test case we are delegating for.
-     * @throws Exception if anything goes wrong during setup
-     */
-    protected void setUp() throws Exception {
-        if (_delegate instanceof MarshallingFrameworkTestCase) {
-            ((MarshallingFrameworkTestCase)_delegate).setUp();
-        } else if (_delegate instanceof SourceGeneratorTestCase) {
-            ((SourceGeneratorTestCase)_delegate).setUp();
-        }
-    }
-
-    /**
-     * Provides tear down for our delegated test case, depending on the type of
-     * test case we are delegating for.
-     * @throws Exception if anything goes wrong during teardown
-     */
-    protected void tearDown() throws Exception {
-        if (_delegate instanceof MarshallingFrameworkTestCase) {
-            ((MarshallingFrameworkTestCase)_delegate).tearDown();
-        } else if (_delegate instanceof SourceGeneratorTestCase) {
-            ((SourceGeneratorTestCase)_delegate).tearDown();
-        }
-    }
-
-    /**
-     * Runs our test case using our delegate object where necessary.
-     */
-    public void runTest() throws Exception { // FIXME - temporarily throws Exception
-        verbose("\n------------------------------");
-        verbose("Test with randomly generated object");
-        verbose("------------------------------\n");
-        if (_delegate._skip) {
-            verbose("-->Skipping the test");
-            return;
-        }
-
-        // Randomize an object model instance
-        CastorTestable randomizedObject = getRandomizedReference();
-
-        // Dump the new random object to a file
-        if (_delegate._hasDump) {
-            verbose("----> Dump the object to '" + _outputName + "-ref.dump" +"'");
-            FileWriter writer = new FileWriter(new File(_delegate._outputRootFile, _outputName + "-ref.dump"));
-            writer.write(randomizedObject.dumpFields());
-            writer.close();
-        }
-
-        // Marshal our reference object to disk
-        File marshal_output = _delegate.testMarshal(randomizedObject, _outputName + ".xml");
-        if (marshal_output == null) {
-            return;
-        }
-
-        // Unmarshal from disk
-        Object unmarshaledRandomizedObject;
-        try {
-            unmarshaledRandomizedObject = _delegate.testUnmarshal(marshal_output);
-        } catch (Exception e) {
-            if (!_delegate.checkExceptionWasExpected(e, FailureStepType.SECOND_UNMARSHAL)) {
-                fail("Exception Unmarshaling from disk " + e);
-            }
-            return;
-        }
-
-        if (_failure != null && _failure.getContent() && _failure.getFailureStep() != null &&
-            _failure.getFailureStep().equals(FailureStepType.SECOND_UNMARSHAL)) {
-            fail("Unmarshaling the marshaled random document was expected to fail, but succeeded");
-        }
-
-        // Dump the unmarshaled object to a file
-        if (_delegate._hasDump) {
-            verbose("---->Dump the object to '" + _outputName + "-unmar.dump" +"'");
-            FileWriter writer = new FileWriter(new File(_delegate._outputRootFile, _outputName + "-unmar.dump"));
-            writer.write(((CastorTestable)unmarshaledRandomizedObject).dumpFields());
-            writer.close();
-        }
-
-        // Compare unmarshaled output file to our initial randomized instance
-        boolean result = unmarshaledRandomizedObject.equals(randomizedObject);
-        verbose("----> Compare unmarshaled document to reference object: " + ((result)?"OK":"### Failed ### "));
-
-        final FailureStepType step = _failure != null ? _failure.getFailureStep() : null;
-        final boolean expectedToFail = _failure != null && _failure.getContent()
-                   && (step == null || step.equals(FailureStepType.COMPARE_TO_REFERENCE));
-
-        if (_failure == null || !_failure.getContent()) {
-            assertTrue("The initial randomized object and the one resulting of the" +
-                       " marshal/unmarshal process are different", result);
-        } else if (expectedToFail) {
-            assertFalse("Comparing the random object to the marshal+unmarshaled one" +
-                        " was expected to fail, but succeeded", result);
-        }
-
-        if (expectedToFail ^ result) {
-            return;
-        }
-
-        if (_failure != null && _failure.getContent()) {
-            fail("The test with random document was expected to fail, but passed");
-        }
-    }
-
-    /**
-     * Creates and returns a new instance of the root object set with random values.
-     * @return a new instance of the root object set with random values.
-     * @throws InstantiationException
-     * @throws IllegalAccessException
-     */
-    private CastorTestable getRandomizedReference() throws InstantiationException, IllegalAccessException {
-        verbose("--> Randomize an object model for the root '" + _delegate._rootClassName + "'.");
-        CastorTestable randomizedObject = ((CastorTestable)_delegate._rootClass.newInstance());
-        assertNotNull("Randomized object model is null", randomizedObject);
-        randomizedObject.randomizeFields();
-        return randomizedObject;
-    }
-
-    private void verbose(String message) {
-        _delegate.verbose(message);
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/TestWithReferenceDocument.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/TestWithReferenceDocument.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/TestWithReferenceDocument.java	(working copy)
@@ -1,410 +0,0 @@
-/*
- * Copyright 2006 Edward Kuns
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: TestWithReferenceDocument.java 0000 2006-10-19 22:00:00Z ekuns $
- */
-package org.exolab.castor.tests.framework;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-
-import junit.framework.TestCase;
-
-import org.exolab.castor.tests.framework.testDescriptor.FailureType;
-import org.exolab.castor.tests.framework.testDescriptor.types.FailureStepType;
-
-/**
- * Implements a test case that tests code written by the XML source generator.
- * This class uses the generated source to read and write an XML document,
- * comparing the XML document written against the reference document that was
- * originally read in.
- * <p>
- * The test follows this sequence:
- *
- * <ol>
- *   <li>Unmarshals the given input file (if any).</li>
- *   <li>Compare the result object with the provided object model (if any).</li>
- *   <li>Marshals the object to a file.</li>
- *   <li>Unmarshals the created file.</li>
- *   <li>Check that the result object is equal to the start object.</li>
- * </ol>
- *
- * @author <a href="mailto:gignoux@kernelcenter.org">Sebastien Gignoux</a>
- * @author <a href="mailto:blandin@intalio.com">Arnaud Blandin</a>
- * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a>
- * @version $Revision: 0000 $ $Date: $
- */
-class TestWithReferenceDocument extends TestCase {
-    /** We add this fixed string to the end of our testcase name. */
-    private static final String REFERENCE = "_ReferenceDocument";
-
-    /** We delegate all actions to this test case. */
-    private final XMLTestCase      _delegate;
-    /** Used only to retrieved the classloader. */
-    protected final CastorTestCase _test;
-    /** The failure object that is not null is the test intends to fail. */
-    protected final FailureType    _failure;
-    /** Class name of the ObjectModelBuilder. */
-    protected final String         _builderClassName;
-    /** Header of the name of all our output files ... marshaled and dumped. */
-    protected final String         _outputName;
-    /** Input file for test XML. (May be null if the builder class is provided.) */
-    protected final String         _inputName;
-    /** Gold file filename, really only useful if a class builder and no input file is given. */
-    protected final String         _goldFileName;
-
-    /**
-     * Blank constructor for this test case.  This contructor is not useful, since
-     * no delegate test case is provided.
-     * @param name Name of our delegate test case
-     */
-    TestWithReferenceDocument(String name) {
-        super(name+REFERENCE);
-        throw new IllegalArgumentException("You cannot use the name-only constructor");
-    }
-
-    /**
-     * Constructs a test case that when invoked will delegate to the provided
-     * test case.
-     * @param name Name of our delegate test case
-     * @param tc
-     */
-    TestWithReferenceDocument(String name, XMLTestCase tc) {
-        super(name+REFERENCE);
-        _delegate         = tc;
-        _test             = tc._test;
-        _failure          = tc._failure;
-        _outputName       = tc._name.replace(' ', '_') + "-testWithReferenceDocument.xml";
-        _builderClassName = tc._unitTest.getObjectBuilder();
-        _inputName        = tc._unitTest.getInput();
-
-        // Gold File should be set to input file if no gold file is specified
-        // but some tests fail (genuine failures) so for now this is disabled.
-
-        if (tc._unitTest.getGoldFile() != null) {
-            _goldFileName = tc._unitTest.getGoldFile();
-        } else {
-            _goldFileName = _inputName;
-        }
-    }
-
-    /**
-     * Provides setup for our delegated test case, depending on the type of
-     * test case we are delegating for.
-     * @throws Exception if anything goes wrong during setup
-     */
-    protected void setUp() throws Exception {
-        if (_delegate == null) {
-            throw new IllegalStateException("No test specified to set up.");
-        }
-
-        if (_delegate instanceof MarshallingFrameworkTestCase) {
-            ((MarshallingFrameworkTestCase)_delegate).setUp();
-        } else if (_delegate instanceof SourceGeneratorTestCase) {
-            ((SourceGeneratorTestCase)_delegate).setUp();
-        }
-    }
-
-    /**
-     * Provides tear down for our delegated test case, depending on the type of
-     * test case we are delegating for.
-     * @throws Exception if anything goes wrong during teardown
-     */
-    protected void tearDown() throws Exception {
-        if (_delegate == null) {
-            throw new IllegalStateException("No test specified to tear down.");
-        }
-
-        if (_delegate instanceof MarshallingFrameworkTestCase) {
-            ((MarshallingFrameworkTestCase)_delegate).tearDown();
-        } else if (_delegate instanceof SourceGeneratorTestCase) {
-            ((SourceGeneratorTestCase)_delegate).tearDown();
-        }
-    }
-
-    /**
-     * Runs our test case using our delegate object where necessary.
-     * <p>
-     * FIXME: Fix this so it throws only specific and necessary exceptions
-     * @throws Exception if anything goes wrong
-     */
-    public void runTest() throws Exception { // FIXME - temporarily throws Exception
-        if (_delegate == null) {
-            throw new IllegalStateException("No test specified to be run.");
-        }
-
-        verbose("\n------------------------------");
-        verbose("Test with reference documents");
-        verbose("------------------------------\n");
-        if (_delegate._skip) {
-            verbose("-->Skipping the test");
-            return;
-        }
-
-        // 1. Get reference document from unmarshaler + input file (if input file is provided)
-        Object refUnmarshal;
-        try {
-            refUnmarshal = getUnmarshaledReference();
-        } catch (Exception e) {
-            if (!_delegate.checkExceptionWasExpected(e, FailureStepType.UNMARSHAL_REFERENCE)) {
-                fail("Exception Unmarshaling from disk " + e);
-            }
-            return;
-        }
-
-        // 2. Get reference document from builder (if builder is provided) -- should never fail
-        Object refGenerated = getBuilderReference();
-
-        // 3. If we have two reference objects, make sure they are the same -- should never fail
-        if (refUnmarshal != null && refGenerated != null) {
-            compareReferenceObjects(refUnmarshal, refGenerated);
-        }
-
-        // 4. Pick our reference object (at least one should be non-null)
-        final Object ref = (refUnmarshal != null) ? refUnmarshal : refGenerated;
-        if (ref == null) {
-            throw new Exception("There is no valid input file or hardcoded object in '" + _delegate._name + "'");
-        }
-
-        // 5. Marshal our reference object to disk
-        File marshal_output;
-        try {
-            marshal_output = _delegate.testMarshal(ref, _outputName);
-        } catch (Exception e) {
-            if (!_delegate.checkExceptionWasExpected(e, FailureStepType.MARSHAL_TO_DISK)) {
-                fail("Exception Unmarshaling from disk " + e);
-            }
-            return;
-        }
-
-        if (_failure != null && _failure.getContent() && _failure.getFailureStep() != null &&
-            _failure.getFailureStep().equals(FailureStepType.MARSHAL_TO_DISK)) {
-            fail("Marshaling the reference document to disk was expected to fail, but succeeded");
-            return;
-        }
-
-        // 6. Compare marshaled document with gold file (if one was provided)
-        if (_goldFileName != null && _goldFileName.length() > 0) {
-            int result = CTFUtils.compare(_delegate._outputRootFile + "/" +  _goldFileName, marshal_output.getAbsolutePath());
-            verbose("----> Compare marshaled document to gold file '" + _goldFileName + "': " + ((result == 0)?"OK":"### Failed ### "));
-
-            final boolean expectedToFail = _failure != null && _failure.getContent()
-                    && _failure.getFailureStep() != null
-                    && _failure.getFailureStep().equals(FailureStepType.COMPARE_TO_REFERENCE);
-
-            if (_failure == null ||!_failure.getContent()) {
-                assertEquals("The Marshaled object differs from the gold file", 0, result);
-            } else if (expectedToFail) {
-                assertTrue("The Marshaled object was expected to differ from the" +
-                           " gold file, but did not", result != 0);
-            }
-        }
-
-        // 7. Marshal the Listener and compare it to the listener gold file, if any
-        compareListenerToItsGoldFile();
-
-        // 8. Unmarshal the output file
-        Object unmarshaledOutput;
-        try {
-            unmarshaledOutput = _delegate.testUnmarshal(marshal_output);
-        } catch (Exception e) {
-            if (!_delegate.checkExceptionWasExpected(e, FailureStepType.SECOND_UNMARSHAL)) {
-                fail("Exception Unmarshaling from disk " + e);
-            }
-            return;
-        }
-
-        if (_failure != null && _failure.getContent() && _failure.getFailureStep() != null &&
-            _failure.getFailureStep().equals(FailureStepType.SECOND_UNMARSHAL)) {
-            fail("Second unmarshaling was expected to fail, but succeeded");
-            return;
-        }
-
-        // 9. Compare unmarshaled output file to ObjectModelBuilder if any.
-        // TODO: Fix the tests that fail this comparison!
-        // Right now many test classes (under xml/MasterTestSuite) do not override equals.
-        // We could check "(ref instanceof CastorTestable)" except that several srcgen
-        // tests fails this check.  (Probably bugs!)  For now we have this bogus
-        // _builderClassName check.  We ideally want to ALWAYS do this comparison.
-        if (_builderClassName != null) {
-            // the equals method must be overriden
-            boolean result  = unmarshaledOutput.equals(ref);
-            if (result == false) {
-                verbose("Make sure the reference object model overrides Object#equals");
-            }
-            verbose("Compare to reference object: " + ((result)?"OK":" ### Failed ### "));
-
-            final FailureStepType step = _failure != null ? _failure.getFailureStep() : null;
-            final boolean expectedToFail = _failure != null && _failure.getContent()
-                           && (step == null || step.equals(FailureStepType.SECOND_COMPARE));
-
-            if (_failure == null || !_failure.getContent()) {
-                assertTrue("The initial reference object and the one resulting of the " +
-                           "marshal/unmarshal process are different", result);
-            } else if (expectedToFail) {
-                assertFalse("Comparing the reference object to the marshal+unmarshaled " +
-                            "one was expected to fail, but succeeded", result);
-            }
-
-            if (expectedToFail ^ result) {
-                return;
-            }
-        }
-
-        if (_failure != null && _failure.getContent()) {
-            fail("The test with reference document was expected to fail, but passed");
-        }
-    }
-
-    /**
-     * Returns a reference document as generated by unmarshaling the input
-     * document provided, if one was provided.
-     * @return a reference document from an unmarshaled input document
-     * @throws Exception if anything goes wrong loading the input document
-     */
-    private Object getUnmarshaledReference() throws Exception {
-        InputStream _input = null;
-        if (_inputName != null) {
-            _input = _test.getClassLoader().getResourceAsStream(_inputName);
-            assertNotNull("The input file '" + _inputName + "' cannot be found.", _input);
-        }
-
-        verbose("--> Unmarshaling '" + _inputName  + "'\n");
-
-        Object refUnmarshal = null;
-        if (_input != null) {
-            refUnmarshal = _delegate.testUnmarshal(_input);
-            _input.close();
-        }
-
-        // If we didn't throw an exception, make sure we were supposed to succeed
-
-        if (_failure != null && _failure.getContent() && _failure.getFailureStep() != null &&
-            _failure.getFailureStep().equals(FailureStepType.UNMARSHAL_REFERENCE)) {
-            fail("Unmarshaling the reference document was expected to fail, but succeeded");
-        }
-
-        assertNotNull("Unmarshaling '" + _inputName + "' results in a NULL object.", refUnmarshal);
-
-        return refUnmarshal;
-    }
-
-    /**
-     * Returns a reference document as generated by the hard-coded
-     * ObjectModelBuilder.
-     *
-     * @return a reference document as generated by the hard-coded
-     *         ObjectModelBuilder
-     * @throws Exception if anything goes wrong executing creating the
-     *             ObjectModelBuilder or using it to create the reference
-     *             document.
-     */
-    private Object getBuilderReference() throws Exception {
-        Object generated = null;
-        if (_builderClassName != null) {
-            generated = _delegate.buildObjectModel(_builderClassName);
-            assertNotNull("The generated object with '" + _builderClassName + "' is null", generated);
-        }
-        return generated;
-    }
-
-    /**
-     * Make sure the ObjectModelBuilder object and the unmarshaled input document
-     * created the same object.
-     * @param refUnmarshal reference object created from unmarshaling an input document
-     * @param refGenerated reference object created by an ObjectModelBuilder
-     * @throws IOException if we get an error dumping the objects to disk.
-     */
-    private void compareReferenceObjects(Object refUnmarshal, Object refGenerated) throws IOException {
-        //the object model must override the equals method.
-        boolean result = refGenerated.equals(refUnmarshal);
-        verbose("----> Compare unmarshaled document to reference object: " + ((result)?"OK":"### Failed ### "));
-        if (result == false) {
-            verbose("Make sure the reference object model overrides Object#equals");
-        }
-
-        if (result == false && refGenerated instanceof CastorTestable) {
-            // try to dump the unmarshaled object and the reference object
-            FileWriter writer = new FileWriter(new File(_delegate._outputRootFile, _outputName + "-refModel.dump"));
-            writer.write(((CastorTestable)refGenerated).dumpFields());
-            writer.close();
-
-            writer = new FileWriter(new File(_delegate._outputRootFile, _outputName + "-refUnmarshal.dump"));
-            writer.write(((CastorTestable)refUnmarshal).dumpFields());
-            writer.close();
-        }
-
-        assertTrue("The unmarshaled reference object differs from the hardcoded reference object.", result);
-    }
-
-    /**
-     * Tests that the listener saw what it was supposed to see. If we have a
-     * listener configured, marshal it to disk (now that it listened to the
-     * previous marshal) and compare it to the listener gold file, if any.
-     * <p>
-     * We have to unregister the listener before we do anything. When we marshal
-     * the MarshalListener, for every item marshaled the listener may grow and
-     * may have more to marshal, and thus we may end up in an endless loop. For
-     * example, a simple implementation of MarshalListener could log each
-     * pre/post marshal invocation on a Vector to allow for later comparisons.
-     * But this means that the object *being marshaled* keeps getting data added
-     * to it during the marshaling!
-     *
-     * @throws Exception if anything goes wrong during the test
-     */
-    private void compareListenerToItsGoldFile() throws Exception {
-        if (_delegate._listenerGoldFile == null || _delegate._listener == null) {
-            return;
-        }
-
-        verbose("Compare listener to gold file: " + _delegate._listenerGoldFile);
-
-        // Get the listener (before we unregister it!)
-        Object listener = _delegate._listener;
-
-        // Unregister the listener
-        _delegate._listener = null;
-
-        File outputFile;
-        try {
-            outputFile = _delegate.testMarshal(listener, "Listener-" + _outputName);
-        } catch (Exception e) {
-            if (!_delegate.checkExceptionWasExpected(e, FailureStepType.LISTENER_COMPARISON)) {
-                fail("Exception Unmarshaling from disk " + e);
-            }
-            return;
-        }
-
-        int result = CTFUtils.compare(_delegate._outputRootFile + "/" +  _delegate._listenerGoldFile, outputFile.getAbsolutePath());
-        verbose("----> Compare marshaled document to gold file '" + _delegate._listenerGoldFile + "': " + ((result == 0)?"OK":"### Failed ### "));
-
-        if (_failure != null && _failure.getContent()) {
-            // Are we are supposed to fail AT THIS STEP?  If not, don't check
-            if (_failure.getFailureStep() != null &&
-                _failure.getFailureStep().equals(FailureStepType.LISTENER_COMPARISON)) {
-                assertTrue("The Marshaled Listener is supposed to differ from its gold file", result != 0);
-            }
-        } else {
-            assertEquals("The Marshaled Listener differs from its gold file", 0, result);
-        }
-    }
-
-    private void verbose(String message) {
-        _delegate.verbose(message);
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/Location.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/Location.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/Location.java	(working copy)
@@ -1,62 +0,0 @@
-/*
- * Copyright 2007 Edward Kuns
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: Location.java 0000 2007-01-09 00:10:00-0600 ekuns $
- */
-package org.exolab.castor.tests.framework.xmldiff.xml;
-
-import org.xml.sax.Locator;
-
-/**
- * An immutable class for storing XML file location information.
- *
- * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a>
- * @version $Revision: 0000 $ $Date: 2007-01-09 00:10:00 -0600 (Tue, 09 Jan 2007) $
- * @since Castor 1.1
- */
-public class Location {
-
-    /** Line number. */
-    private final int _line;
-    /** Column number. */
-    private final int _column;
-
-    /**
-     * Creates a new Location with the current values from the provided Locator.
-     *
-     * @param locator a SAX locator
-     */
-    public Location(Locator locator) {
-        _line   = locator.getLineNumber();
-        _column = locator.getColumnNumber();
-    }
-
-    /**
-     * Returns the column number.
-     * @return the column number.
-     */
-    public int getColumnNumber() {
-        return _column;
-    }
-
-    /**
-     * Returns the line number.
-     * @return the line number.
-     */
-    public int getLineNumber() {
-        return _line;
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/Attribute.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/Attribute.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/Attribute.java	(working copy)
@@ -1,58 +0,0 @@
-/*
- * Copyright 2007 Edward Kuns
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: Attribute.java 0000 2007-01-11 00:00:00Z ekuns $
- */
-package org.exolab.castor.tests.framework.xmldiff.xml.nodes;
-
-/**
- * A class representing an Attribute XML node.
- *
- * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a>
- * @version $Revision: 0000 $ $Date: 2007-01-11 00:00:00 -0600 (Thu, 11 Jan 2007) $
- * @since Castor 1.1
- */
-public class Attribute extends XMLNode {
-
-    /** Serial Version UID. */
-    private static final long serialVersionUID = 2499101510478363466L;
-    /** Attribute value. */
-    private final String      _value;
-
-    /**
-     * Creates a new Attribute.
-     *
-     * @param namespace the namespace URI for this node. (May be null.)
-     * @param localName the localname of this node. (Cannot be null.)
-     * @param value the String value of this attribute. (Cannot be null.)
-     */
-    public Attribute(String namespace, String localName, String value) {
-        super(namespace, localName, XMLNode.ATTRIBUTE);
-        if (localName == null || localName.length() == 0) {
-            throw new IllegalArgumentException("An Attribute localname must be non-null "
-                                               + "and must have a non-zero length");
-        }
-        this._value = value;
-    } // -- Attribute
-
-    /**
-     * Returns the string value of this attribute.
-     * @return The string value of this attribute.
-     */
-    public String getStringValue() {
-        return _value;
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/Element.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/Element.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/Element.java	(working copy)
@@ -1,190 +0,0 @@
-/*
- * Copyright 2007 Edward Kuns
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: Element.java 0000 2007-01-11 00:00:00Z ekuns $
- */
-package org.exolab.castor.tests.framework.xmldiff.xml.nodes;
-
-import java.util.Iterator;
-import java.util.LinkedList;
-
-import org.exolab.castor.tests.framework.xmldiff.xml.Location;
-
-/**
- * A representation of an Element XML node.
- *
- * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a>
- * @version $Revision: 0000 $ $Date: 2007-01-11 00:00:00 -0600 (Thu, 11 Jan 2007) $
- * @since Castor 1.1
- */
-public class Element extends ParentNode {
-
-    /** Serial Version UID. */
-    private static final long serialVersionUID = 7995110660306473483L;
-    /** Our list of Attributes. */
-    private final LinkedList  _attributes      = new LinkedList();
-    /** Our list of Namespaces. */
-    private final LinkedList  _namespaces      = new LinkedList();
-    /** Our location */
-    private Location          _location        = null;
-
-    /**
-     * Creates a new Element.
-     *
-     * @param namespace the namespace URI for this node. (May be null.)
-     * @param localName the localname of this node. (Cannot be null.)
-     */
-    public Element(final String namespace, final String localName) {
-        super(namespace, localName, XMLNode.ELEMENT);
-    }
-
-    /**
-     * Returns an Iterator over the List of Attributes.
-     * @return an Iterator over the List of Attributes.
-     */
-    public Iterator getAttributeIterator() {
-        return _attributes.iterator();
-    }
-
-    /**
-     * Returns the value of the named attribute, or null if the node has no such
-     * attribute. If the argument <tt>uri</tt> is null, the node's namespace
-     * URI will be used.
-     *
-     * @param uri The attribute's namespace URI, or null
-     * @param localName The attribute's local name
-     * @return The attribute's value, or null if no such attribute exists
-     */
-    public String getAttribute(final String uri, final String localName) {
-        for (Iterator i = _attributes.iterator(); i.hasNext();) {
-            Attribute attr = (Attribute) i.next();
-            if (namespacesEqual(uri, attr.getNamespaceURI())
-                && attr.getLocalName().equals(localName)) {
-                return attr.getStringValue();
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Returns the namespace URI associated with this namespace prefix, as
-     * defined in the context of this node. Returns null if the prefix is
-     * undefined. Returns an empty String if the prefix is defined and
-     * associated with no namespace.
-     *
-     * @param prefix The namespace prefix
-     * @return The namespace URI, or null.
-     */
-    public String getNamespaceURI(final String prefix) {
-        String desiredPrefix = (prefix == null) ? "" : prefix;
-
-        for (Iterator i = _namespaces.iterator(); i.hasNext(); ) {
-            Namespace ns = (Namespace) i.next();
-            if (desiredPrefix.equals(ns.getPrefix())) {
-                return ns.getNamespaceUri();
-            }
-        }
-
-        // If we didn't find it, search our parent
-        return super.getNamespaceURI(desiredPrefix);
-    }
-
-    /**
-     * Returns the namespace prefix associated with this namespace URI, as
-     * defined in the context of this node. Returns null if no prefix is defined
-     * for this namespace URI. Returns an empty string if the default prefix is
-     * associated with this namespace URI.
-     *
-     * @param uri The namespace URI
-     * @return The namespace prefix, or null
-     */
-    public String getNamespacePrefix(final String uri) {
-        String desiredUri = (uri == null) ? "" : uri;
-
-        for (Iterator i = _namespaces.iterator(); i.hasNext(); ) {
-            Namespace ns = (Namespace) i.next();
-            if (desiredUri.equals(ns.getNamespaceUri())) {
-                return ns.getPrefix();
-            }
-        }
-
-        // If we didn't find it locally, search our parent
-        ParentNode parent = getParentNode();
-        if (parent != null && parent instanceof Element) {
-            return ((Element)parent).getNamespacePrefix(desiredUri);
-        }
-
-        // If no parent, return null
-        return null;
-    }
-
-    /**
-     * Adds the given Attribute to this Element.
-     *
-     * @param attr the Attribute to add
-     */
-    public void addAttribute(final Attribute attr) {
-        if (attr == null) {
-            return;
-        }
-
-        attr.setParent(this);
-        _attributes.add(attr);
-    }
-
-    /**
-     * Adds the given Namespace to this Element.
-     *
-     * @param namespace the Namespace to add
-     */
-    public void addNamespace(final Namespace namespace) {
-        if (namespace == null) {
-            return;
-        }
-
-        _namespaces.add(namespace);
-    }
-
-    /**
-     * Returns true if the given two namespace URI strings are equal.
-     *
-     * @param ns1 The first namespace URI to compare
-     * @param ns2 The second namespace URI to compare
-     * @return true if the given two namespace URI strings are equal.
-     */
-    private boolean namespacesEqual(final String ns1, final String ns2) {
-        final String namespace1 = (ns1 == null) ? "" : ns1;
-        final String namespace2 = (ns2 == null) ? "" : ns2;
-
-        return namespace1.equals(namespace2);
-    }
-
-    /**
-     * Sets the location of this Element in the document.
-     * @param location the location of this Element in the document.
-     */
-    public void setLocation(final Location location) {
-        _location = location;
-    }
-
-    /**
-     * Returns the location of this Element in the document.
-     * @return the location of this Element in the document.
-     */
-    public Location getLocation() {
-        return _location;
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/Namespace.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/Namespace.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/Namespace.java	(working copy)
@@ -1,63 +0,0 @@
-/*
- * Copyright 2007 Edward Kuns
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: Namespace.java 0000 2007-01-11 00:00:00Z ekuns $
- */
-package org.exolab.castor.tests.framework.xmldiff.xml.nodes;
-
-/**
- * A class representing a Namespace for an Element.  Objects of this type
- * are not part of the XML node tree.
- *
- * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a>
- * @version $Revision: 0000 $ $Date: 2007-01-11 00:00:00 -0600 (Thu, 11 Jan 2007) $
- * @since Castor 1.1
- */
-public class Namespace  {
-
-    /** Prefix for this Namespace */
-    private final String      _prefix;
-    /** Namespace URI of this Namespace. */
-    private final String      _namespaceUri;
-
-    /**
-     * Creates a new Namespace object for an XML Element.
-     *
-     * @param prefix the prefix of this namespace binding. (May be null.)
-     * @param namespaceURI the namespace URI mapped to this prefix. (May be
-     *        null.)
-     */
-    public Namespace(final String prefix, final String namespaceURI) {
-        _prefix        = prefix;
-        _namespaceUri  = namespaceURI;
-    }
-
-    /**
-     * Returns the prefix of this namespace.
-     * @return The prefix of this namespace.
-     */
-    public String getPrefix() {
-        return _prefix;
-    }
-
-    /**
-     * Returns the string value of the namespace.
-     * @return The string value of the namespace.
-     */
-    public String getNamespaceUri() {
-        return _namespaceUri;
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/ParentNode.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/ParentNode.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/ParentNode.java	(working copy)
@@ -1,103 +0,0 @@
-/*
- * Copyright 2007 Edward Kuns
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: ParentNode.java 0000 2007-01-11 00:00:00Z ekuns $
- */
-package org.exolab.castor.tests.framework.xmldiff.xml.nodes;
-
-import java.util.Iterator;
-import java.util.LinkedList;
-
-/**
- * The base object for both Element and RootNode.  The children of a ParentNode
- * can be any type of XMLNode.
- *
- * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a>
- * @version $Revision: 0000 $ $Date: 2007-01-11 00:00:00 -0600 (Thu, 11 Jan 2007) $
- * @since Castor 1.1
- */
-public abstract class ParentNode extends XMLNode {
-
-    /** The list of all children.  Children may be any type of XMLNode. */
-    private final LinkedList _children = new LinkedList();
-
-    /**
-     * Creates a new ParentNode.
-     *
-     * @param namespace the namespace URI for this node. (May be null.)
-     * @param localName the local-name of this node. (Cannot be null.)
-     * @param nodeType the node type being created
-     */
-    ParentNode(String namespace, String localName, int nodeType) {
-        super(namespace, localName, nodeType);
-    }
-
-    /**
-     * Returns an Iterator over the list of child nodes.
-     * @return an Iterator over the list of child nodes.
-     */
-    public Iterator getChildIterator() {
-        return _children.iterator();
-    }
-
-    /**
-     * Returns true if this node has any child nodes.
-     * @return True if this node has any child nodes.
-     */
-    public boolean hasChildNodes() {
-        return !_children.isEmpty();
-    }
-
-    /**
-     * Returns the string value of this parent node. The string value is the
-     * concatenation of the string value of all child nodes.
-     *
-     * @return The string value of the node
-     */
-    public String getStringValue() {
-        if (_children.isEmpty()) {
-            return "";
-        }
-
-        StringBuffer sb = new StringBuffer();
-        for (Iterator i = _children.iterator(); i.hasNext(); ) {
-            XMLNode child = (XMLNode) i.next();
-            sb.append(child.getStringValue());
-        }
-        return sb.toString();
-    }
-
-    /**
-     * Adds the given child node to this ParentNode.
-     *
-     * @param node the child node to add
-     */
-    public void addChild(XMLNode node) {
-        if (node == null) {
-            return;
-        }
-
-        // Normalize text nodes if necessary
-        XMLNode last = (_children.isEmpty()) ? null : (XMLNode) _children.getLast();
-        if (last != null && last.getNodeType() == XMLNode.TEXT && node.getNodeType() == XMLNode.TEXT) {
-            Text text = (Text) last;
-            text.setValue(text.getStringValue() + node.getStringValue());
-        } else {
-            node.setParent(this);
-            _children.add(node);
-        }
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/ProcessingInstruction.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/ProcessingInstruction.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/ProcessingInstruction.java	(working copy)
@@ -1,55 +0,0 @@
-/*
- * Copyright 2007 Edward Kuns
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: ProcessingInstruction.java 0000 2007-01-11 00:00:00Z ekuns $
- */
-package org.exolab.castor.tests.framework.xmldiff.xml.nodes;
-
-/**
- * A class representing an XML Processing Instruction.
- *
- * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a>
- * @version $Revision: 0000 $ $Date: 2007-01-11 00:00:00 -0600 (Thu, 11 Jan 2007) $
- * @since Castor 1.1
- */
-public class ProcessingInstruction extends XMLNode {
-
-    /** Serial Version UID. */
-    private static final long serialVersionUID = 4502831396237763129L;
-    /** Value of the processing instructions. */
-    private final String      _value;
-
-    /**
-     * Creates a new ProcessingInstruction.
-     *
-     * @param target the target for this Processing Instruction. (May be null.)
-     * @param value the value of this Processing Instruction. (May be null.)
-     */
-    public ProcessingInstruction(final String target, final String value) {
-        super(null, target, XMLNode.PROCESSING_INSTRUCTION);
-        _value = value;
-    }
-
-    /**
-     * Returns the string value of the node. The string value of a processing
-     * instruction is the instruction.
-     *
-     * @return The string value of the node.
-     */
-    public String getStringValue() {
-        return _value;
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/Root.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/Root.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/Root.java	(working copy)
@@ -1,50 +0,0 @@
-/*
- * Copyright 2007 Edward Kuns
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: Root.java 0000 2007-01-11 00:00:00Z ekuns $
- */
-package org.exolab.castor.tests.framework.xmldiff.xml.nodes;
-
-/**
- * A representation of a Root node.
- *
- * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a>
- * @version $Revision: 0000 $ $Date: 2007-01-11 00:00:00 -0600 (Thu, 11 Jan 2007) $
- * @since Castor 1.1
- */
-public class Root extends ParentNode {
-
-    /** Serial Version UID. */
-    private static final long   serialVersionUID = -4945943618209646133L;
-    /** Local name for a root object is special. */
-    private static final String ROOT_NAME = "#root";
-
-    /**
-     * Creates a new Root Node.  Basically, a root node can contain only
-     * Elements and nothing else.
-     */
-    public Root() {
-        super(null, ROOT_NAME, XMLNode.ROOT);
-    }
-
-    /**
-     * Returns the root node, i.e., <code>this</code>.
-     * @return The root node.
-     */
-    public XMLNode getRootNode() {
-        return this;
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/Text.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/Text.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/Text.java	(working copy)
@@ -1,60 +0,0 @@
-/*
- * Copyright 2007 Edward Kuns
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: Text.java 0000 2007-01-11 00:00:00Z ekuns $
- */
-package org.exolab.castor.tests.framework.xmldiff.xml.nodes;
-
-/**
- * A class representing an XML Text node.
- *
- * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a>
- * @version $Revision: 0000 $ $Date: 2007-01-11 00:00:00 -0600 (Thu, 11 Jan 2007) $
- * @since Castor 1.1
- */
-public class Text extends XMLNode {
-
-    /** Serial Version UID. */
-    private static final long serialVersionUID = 6684442960507498460L;
-    /** The value of this text node. */
-    private String _value = null;
-
-    /**
-     * Creates a new Text node with the given initial value.
-     *
-     * @param value the text value of this XML Text node.
-     */
-    public Text(final String value) {
-        super(null, null, XMLNode.TEXT);
-        _value = value;
-    }
-
-    /**
-     * Returns the string value of this Text node.
-     * @return The string value of this Text node.
-     */
-    public String getStringValue() {
-        return _value;
-    }
-
-    /**
-     * Sets the value for this text node.
-     * @param value The new value for this text node.
-     */
-    public void setValue(final String value) {
-        this._value = value;
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/XMLNode.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/XMLNode.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/nodes/XMLNode.java	(working copy)
@@ -1,245 +0,0 @@
-/*
- * Copyright 2007 Edward Kuns
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: Element.java 0000 2007-01-11 00:00:00Z ekuns $
- */
-package org.exolab.castor.tests.framework.xmldiff.xml.nodes;
-
-import java.util.Iterator;
-
-import org.exolab.castor.tests.framework.xmldiff.xml.Location;
-
-/**
- * The base node for all XMLNode types.
- *
- * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a>
- * @version $Revision: 0000 $ $Date: 2007-01-11 00:00:00 -0600 (Thu, 11 Jan 2007) $
- * @since Castor 1.1
- */
-public abstract class XMLNode {
-
-    /** Node is a root node. */
-    public static final int    ROOT                   = 1;
-    /** Node is an element. */
-    public static final int    ELEMENT                = 2;
-    /** Node is an attribute. */
-    public static final int    ATTRIBUTE              = 3;
-    /** Node is a text node. */
-    public static final int    TEXT                   = 4;
-    /** Node is a processing instruction. */
-    public static final int    PROCESSING_INSTRUCTION = 5;
-
-    /** The localname (non-qualified) for this XMLNode. */
-    private final String       _localName;
-    /** The node type being created. */
-    private final int          _nodeType;
-
-    /** A reference for the parent node. */
-    private ParentNode         _parent           = null;
-    /** The namespace to which this XMLNode belongs. */
-    private String             _namespace        = null;
-
-    /**
-     * Creates a new XMLNode
-     *
-     * @param namespace the namespace URI for this node. [May be null]
-     * @param localName the local-name of this node. [May be null]
-     * @param nodeType the node type being created
-     */
-    XMLNode(final String namespace, final String localName, final int nodeType) {
-        _namespace = namespace;
-        _localName = localName;
-        _nodeType  = nodeType;
-    }
-
-    /**
-     * Returns the type of this node.
-     * @return The type of this node
-     */
-    public final int getNodeType() {
-        return _nodeType;
-    }
-
-    /**
-     * Returns the local name of the node. Returns the local name of an element
-     * or attribute, the prefix of a namespace node, the target of a processing
-     * instruction, or null for all other node types.
-     *
-     * @return The local name of the node, or null if the node has no name
-     */
-    public String getLocalName() {
-        return _localName;
-    }
-
-    /**
-     * Returns the namespace URI the node. Returns the namespace URI of an
-     * element, attribute or namespace node, or null for all other node types.
-     *
-     * @return The namespace URI of the node, or null if the node has no
-     *         namespace URI
-     */
-    public String getNamespaceURI() {
-        return _namespace;
-    }
-
-    /**
-     * Returns the parent node, or null if the node has no parent. This method
-     * is valid on all node types except the root node. Attribute and namespace
-     * nodes have the element as their parent node.
-     *
-     * @return The parent node, or null
-     */
-    public ParentNode getParentNode() {
-        return _parent;
-    }
-
-    /**
-     * Returns the root node.
-     *
-     * @return The root node
-     */
-    public XMLNode getRootNode() {
-        return (_parent != null) ? _parent.getRootNode() : null;
-    }
-
-    /**
-     * Returns the string value of the node. The string value of a text node or
-     * an attribute node is its text value. The string value of an element or a
-     * root node is the concatenation of the string value of all its child
-     * nodes. The string value of a namespace node is its namespace URI. The
-     * string value of a processing instruction is the instruction, and the
-     * string value of a comment is the comment text.
-     *
-     * @return The string value of the node
-     */
-    public abstract String getStringValue();
-
-    /**
-     * Returns the namespace URI associated with this namespace prefix, as
-     * defined in the context of this node. Returns null if the prefix is
-     * undefined. Returns empty if the prefix is defined and associated with no
-     * namespace. This method is valid only for element nodes.
-     *
-     * @param prefix The namespace prefix
-     * @return The namespace URI, or null
-     */
-    public String getNamespaceURI(final String prefix) {
-        return (_parent != null) ? _parent.getNamespaceURI(prefix) : null;
-    }
-
-    /**
-     * Sets the namespace URI for this XMLNode.
-     * @param namespace the Namespace URI
-     */
-    public void setNamespace(final String namespace) {
-        _namespace = namespace;
-    }
-
-    /**
-     * Sets the parent XMLNode.
-     *
-     * @param node the XMLNode which is the parent of this XMLNode
-     */
-    void setParent(final ParentNode node) {
-        _parent = node;
-    }
-
-    /**
-     * Finds and returns the location of this node in its root's tree.
-     * @return the location of this node in its root's tree.
-     */
-    public String getNodeLocation() {
-        int column = -1;
-        int line = -1;
-
-        String xpath = "XPATH: " + getXPath();
-
-        if (this instanceof Element) {
-            Location loc = ((Element) this).getLocation();
-            if (loc != null) {
-                line = loc.getLineNumber();
-                column = loc.getColumnNumber();
-            }
-        }
-
-        String location = null;
-        if (line >= 0) {
-            location = "[" + line + ", " + column + "] " + xpath;
-        } else {
-            location = xpath;
-        }
-
-        return location;
-    }
-
-    /**
-     * Returns the XPath from the root node to this node.
-     * @return the XPath from the root node to this node.
-     */
-    protected String getXPath() {
-        StringBuffer xpath = new StringBuffer();
-
-        switch (getNodeType()) {
-            case XMLNode.ATTRIBUTE:
-                xpath.append(getParentNode().getXPath() + "/@" + getLocalName());
-                break;
-            case XMLNode.ELEMENT:
-                String name = getLocalName();
-                xpath.append(getParentNode().getXPath() + "/" + name);
-
-                // Do we have elements of the same type before us in our parent's list?
-                int position = 1;
-                Iterator i = getParentNode().getChildIterator();
-                while (i.hasNext()) {
-                    XMLNode sibling = (XMLNode) i.next();
-                    if (sibling == this) {
-                        break;
-                    }
-                    if (name.equals(sibling.getLocalName())) {
-                        ++position;
-                    }
-                }
-
-                boolean usePosition = (position > 1);
-                if (!usePosition) {
-                    // Do we have elements of the same type after us in our parent's list?
-                    while (i.hasNext()) {
-                        XMLNode sibling = (XMLNode) i.next();
-                        if (name.equals(sibling.getLocalName())) {
-                            usePosition = true;
-                            break;
-                        }
-                    }
-                }
-                if (usePosition) {
-                    xpath.append("[" + position + "]");
-                }
-                break;
-            case XMLNode.TEXT:
-                xpath.append(getParentNode().getXPath() + "/text()");
-                break;
-            case XMLNode.ROOT:
-                break;
-            case XMLNode.PROCESSING_INSTRUCTION:
-                xpath.append(getParentNode().getXPath() + "/pi()");
-                break;
-            default:
-                break;
-        }
-
-        return xpath.toString();
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/XMLContentHandler.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/XMLContentHandler.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/XMLContentHandler.java	(working copy)
@@ -1,267 +0,0 @@
-/*
- * Copyright 2007 Edward Kuns
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: XMLBuilder.java 0000 2007-01-11 00:00:00Z ekuns $
- */
-package org.exolab.castor.tests.framework.xmldiff.xml;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Stack;
-
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.Attribute;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.Element;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.Namespace;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.ParentNode;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.ProcessingInstruction;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.Root;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.Text;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-
-/**
- * A ContentHandler implementation that builds a tree of XMLNodes.
- *
- * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a>
- * @version $Revision: 0000 $ $Date: 2007-01-11 00:00:00 -0600 (Thu, 11 Jan 2007) $
- * @since Castor 1.1
- */
-public class XMLContentHandler implements ContentHandler {
-
-    /** The current node stack. */
-    private final Stack         _nodeStack            = new Stack();
-    /** Root BaseNode, the BaseNode being created.. */
-    private final Root          _root                 = new Root();
-
-    /** SAX document Locator, set by a SAX Parser. */
-    private Locator             _locator              = null;
-    /** The current node to which we are adding content. */
-    private ParentNode          _currentNode          = null;
-    /** Keeps track of all URL mapping prefixes currently defined.  */
-    private Map                 _prefixes             = new HashMap();
-
-    /**
-     * Creates a new XMLBuilder.
-     */
-    public XMLContentHandler() {
-        _nodeStack.push(_root);
-        _currentNode = _root;
-    }
-
-    /**
-     * Creates a new text node from incoming characters.
-     *
-     * @param chars The character array containing the XML content
-     * @param start First index of character for our new Text node
-     * @param length count of characters for our Text node.
-     * @throws org.xml.sax.SAXException never
-     */
-    public void characters(final char[] chars, final int start, final int length) throws org.xml.sax.SAXException {
-        _currentNode.addChild(new Text(new String(chars, start, length)));
-    }
-
-    /**
-     * Signals the end of the document.
-     * @throws org.xml.sax.SAXException never
-     */
-    public void endDocument() throws org.xml.sax.SAXException {
-        // Nothing to do
-    }
-
-    /**
-     * Signals the end of an Element.
-     * @param uri The namespace URI
-     * @param name the local name of the element.
-     * @param qName the qualified naem of the element
-     * @throws org.xml.sax.SAXException if we have a mismatched end element tag
-     */
-    public void endElement(final String uri, final String name, final String qName)
-                                                   throws org.xml.sax.SAXException {
-        final String localName = name;
-
-        final int idx = qName.indexOf(':');
-        final String prefix = (idx >= 0) ? qName.substring(0, idx) : "";
-
-        // Check the prefix to make sure it is appropriate
-        String uriOfPrefix = _currentNode.getNamespaceURI(prefix);
-        String uriOfElement = _currentNode.getNamespaceURI();
-        if ((uriOfPrefix == null ^ uriOfElement == null)
-                || (uriOfPrefix != null && !uriOfPrefix.equals(uriOfElement))) {
-            throw new org.xml.sax.SAXException("In Element " + qName + ", URI of prefix " + uriOfPrefix +
-                                               " does not match URI of Element " + uriOfElement);
-        }
-
-        String cName = _currentNode.getLocalName();
-        if (!cName.equals(localName)) {
-            String err = "Element end tag mismatch:  expecting </" + cName
-                         + "> but recieved </" + localName + ">";
-            throw new SAXException(err);
-        }
-
-        _nodeStack.pop();
-        _currentNode = (ParentNode) _nodeStack.peek();
-    }
-
-    /**
-     * Signals the end of prefix mapping.
-     * @param prefix The namespace prefix mapping that is ending
-     * @throws org.xml.sax.SAXException never
-     */
-    public void endPrefixMapping(final String prefix) throws SAXException {
-        _prefixes.remove(prefix);
-    }
-
-    /**
-     * Returns the Root node.
-     * @return the root node.
-     */
-    public Root getRoot() {
-        return _root;
-    }
-
-    /**
-     * Ignores ignorable whitespace.
-     *
-     * @param chars The character array containing the XML content
-     * @param start First index of the ignorable whitespace
-     * @param length count of characters for the ignorable whitespace
-     * @throws org.xml.sax.SAXException never
-     */
-    public void ignorableWhitespace(final char[] chars, final int start, final int length)
-                                                  throws org.xml.sax.SAXException {
-        // Deliberately ignore -- we don't care
-    }
-
-    /**
-     * Creates a new Processing Instruction node.
-     *
-     * @param target the target of the processing instruction
-     * @param data the content of the processing instruction
-     * @throws org.xml.sax.SAXException never
-     */
-    public void processingInstruction(final String target, final String data)
-                                                  throws org.xml.sax.SAXException {
-        ProcessingInstruction pi = new ProcessingInstruction(target, data);
-        _currentNode.addChild(pi);
-    }
-
-    /**
-     * Configures the Locator we will use.
-     *
-     * @param locator the Locator used by this DocumentHandler.
-     */
-    public void setDocumentLocator(final Locator locator) {
-        _locator = locator;
-    }
-
-    /**
-     * Gives notification about a skipped Entity during XML parsing.
-     * @param name the name of the skipped entity.
-     */
-    public void skippedEntity(final String name) {
-        // Nothing to do
-    }
-
-    /**
-     * Signals the beginning of the document.
-     * @throws org.xml.sax.SAXException never
-     */
-    public void startDocument() throws SAXException {
-        // Nothing to do
-    }
-
-    /**
-     * Signals the beginning of an Element node.
-     *
-     * @param uri The namespace URI
-     * @param name the local name of the element.
-     * @param qName the qualified naem of the element
-     * @param atts a list of attributes for this Element
-     * @throws org.xml.sax.SAXException If we are not given an element name.
-     */
-    public void startElement(final String uri, final String name, final String qName, final Attributes atts) throws org.xml.sax.SAXException {
-        if (qName == null) {
-            throw new SAXException("No Element name given");
-        }
-
-        final String prefix;
-        final String localName;
-
-        int idx = qName.indexOf(':');
-        if (idx >= 0) {
-            prefix = qName.substring(0, idx);
-            localName = qName.substring(idx + 1);
-        } else {
-            prefix = "";
-            localName = qName;
-        }
-
-        Element element = new Element(null, localName);
-
-        if (_locator != null) {
-            element.setLocation(new Location(_locator));
-        }
-
-        _currentNode.addChild(element);
-
-        // Add all current namespaces to this element
-        for (Iterator i = _prefixes.entrySet().iterator(); i.hasNext(); ) {
-            Map.Entry me = (Map.Entry) i.next();
-            element.addNamespace(new Namespace((String)me.getKey(), (String) me.getValue()));
-        }
-
-        // Then add all attributes
-        if (atts != null && atts.getLength() > 0) {
-            for (int i = 0; i < atts.getLength(); i++) {
-                String attName = atts.getQName(i);
-                String ns = null;
-                idx = attName.indexOf(':');
-                if (idx > 0) {
-                    ns = element.getNamespaceURI(attName.substring(0, idx));
-                    attName = attName.substring(idx + 1);
-                }
-                element.addAttribute(new Attribute(ns, attName, atts.getValue(i)));
-            }
-        }
-
-        // Set the namespace on this Element, if one is explicit or defaulted
-        if (prefix != null && prefix.length() > 0) {
-            String namespace = element.getNamespaceURI(prefix);
-            element.setNamespace(namespace);
-        } else {
-            String namespace = element.getNamespaceURI("");
-            if (namespace != null) {
-                element.setNamespace(namespace);
-            }
-        }
-
-        _nodeStack.push(element);
-        _currentNode = element;
-    }
-
-    /**
-     * Begins the scope of a prefix-URI Namespace mapping.
-     * @param prefix The namespace prefix mapping that is ending
-     * @param uri The namespace URI
-     * @throws org.xml.sax.SAXException never
-     */
-    public void startPrefixMapping(final String prefix, final String uri) {
-        _prefixes.put(prefix, uri);
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/XMLFileReader.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/XMLFileReader.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/xml/XMLFileReader.java	(working copy)
@@ -1,128 +0,0 @@
-/*
- * Copyright 2007 Edward Kuns
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: XMLReader.java 0000 2007-01-11 00:00:00Z ekuns $
- */
-package org.exolab.castor.tests.framework.xmldiff.xml;
-
-import java.io.File;
-import java.io.FileReader;
-import java.net.MalformedURLException;
-
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.XMLNode;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.Root;
-import org.exolab.castor.util.NestedIOException;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-
-/**
- * A Utility class to read an XML document from a file into the XMLNode tree
- * used by the XMLDiff class.
- *
- * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a>
- * @version $Revision: 0000 $ $Date: 2007-01-11 00:00:00 -0600 (Thu, 11 Jan 2007) $
- * @see org.exolab.castor.tests.framework.xmldiff.XMLDiff
- * @since Castor 1.1
- */
-public class XMLFileReader {
-
-    /** The file we are reading. */
-    private final File      _file;
-    /** URL for the document to be parsed. */
-    private final String    _location;
-    /** A handle to the SAX parser. */
-    private final XMLReader _parser;
-
-    /**
-     * Creates a new XMLReader for the given URILocation.
-     *
-     * @param filename the URILocation to create this reader for.
-     */
-    public XMLFileReader(final String filename) {
-        if (filename == null) {
-            throw new IllegalArgumentException("You must give a non-null fliename");
-        }
-        _file = new File(filename);
-        if (!_file.exists()) {
-            throw new IllegalArgumentException("File '" + filename + "' does not exist");
-        }
-
-        _location = getUrlFromFile();
-        _parser   = new org.apache.xerces.parsers.SAXParser();
-    }
-
-    /**
-     * Reads an XML Document into an BaseNode from the provided file.
-     *
-     * @return the BaseNode
-     * @throws java.io.IOException if any exception occurs during parsing
-     */
-    public XMLNode read() throws java.io.IOException {
-        XMLNode node = null;
-
-        try {
-            InputSource source = new InputSource();
-            source.setSystemId(_location);
-            source.setCharacterStream(new FileReader(_file));
-
-            XMLContentHandler builder = new XMLContentHandler();
-
-            _parser.setContentHandler(builder);
-            _parser.parse(source);
-
-            node = builder.getRoot();
-        } catch (SAXException sx) {
-            Exception nested = sx.getException();
-
-            SAXParseException sxp = null;
-            if (sx instanceof SAXParseException) {
-                sxp = (SAXParseException) sx;
-            } else if (nested != null && (nested instanceof SAXParseException)) {
-                sxp = (SAXParseException) nested;
-            } else {
-                throw new NestedIOException(sx);
-            }
-
-            StringBuffer err = new StringBuffer(sxp.toString());
-            err.append("\n - ");
-            err.append(sxp.getSystemId());
-            err.append("; line: ");
-            err.append(sxp.getLineNumber());
-            err.append(", column: ");
-            err.append(sxp.getColumnNumber());
-            throw new NestedIOException(err.toString(), sx);
-        }
-
-        Root root = (Root) node;
-        return root;
-    }
-
-    /**
-     * Returns the absolute URL as a string.
-     * @param file The URL to resolve
-     * @return the absolute URL as a string.
-     */
-    private String getUrlFromFile() {
-        try {
-            return _file.toURL().toString();
-        } catch (MalformedURLException e) {
-            // ignore -- cannot happen
-        }
-        return null;
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/XMLDiff.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/XMLDiff.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/xmldiff/XMLDiff.java	(working copy)
@@ -1,670 +0,0 @@
-/*
- * Copyright 2007 Edward Kuns
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: XMLDiff.java 0000 2007-01-11 00:00:00Z ekuns $
- */
-package org.exolab.castor.tests.framework.xmldiff;
-
-import java.io.PrintWriter;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.exolab.castor.tests.framework.xmldiff.xml.XMLFileReader;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.Attribute;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.Element;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.ParentNode;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.Root;
-import org.exolab.castor.tests.framework.xmldiff.xml.nodes.XMLNode;
-
-/**
- * A utility class used to compare two XMLNodes, or XML input files and report
- * the differences between them.
- *
- * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a>
- * @version $Revision: 0000 $ $Date: 2007-01-11 00:00:00 -0600 (Thu, 11 Jan 2007) $
- * @since Castor 1.1
- */
-public class XMLDiff {
-
-    /** The namespace of XML Schema. */
-    private static final String XMLSCHEMA_INSTANCE = "http://www.w3.org/2001/XMLSchema-instance";
-
-    /** Filename of the 1st XML item being compared. */
-    private final String      _file1;
-    /** Filename of the 2nd XML item being compared. */
-    private final String      _file2;
-    /** PrintWriter used for this comparison. */
-    private final PrintWriter _pw               = new PrintWriter(System.out, true);
-
-    /**
-     * A boolean to indicate whether or not child order should be strictly
-     * enforced. By default child order is treated as "all", meaning that as
-     * long as a child exists, it doesn't matter which order the children occur.
-     */
-    private boolean           _strictChildOrder = false;
-    /** True if we should print errors to the PrintWriter. */
-    private boolean           _print            = true;
-    /** True if we have not yet printed the diff header. */
-    private boolean           _header           = true;
-
-    /**
-     * Constructs an XMLDiff object that is ready to compare the two provided
-     * XML files.
-     *
-     * @param file1 The first XML file for comparison.
-     * @param file2 The second XML file for comparison.
-     */
-    public XMLDiff(final String file1, final String file2) {
-        if (file1 == null) {
-            String err = "The argument 'file1' may not be null.";
-            throw new IllegalArgumentException(err);
-        }
-
-        if (file2 == null) {
-            String err = "The argument 'file2' may not be null.";
-            throw new IllegalArgumentException(err);
-        }
-
-        _file1 = file1;
-        _file2 = file2;
-    }
-
-    /**
-     * Compares the two XML documents located at the given URL locations.
-     * Returns 0, if no differences are found, otherwise returns a positive
-     * number indicating the number of differences.
-     * <p>
-     * This is the only public method in this class.
-     *
-     * @return 0, if no differences are found, otherwise a positive number
-     *         indicating the number of differences.
-     * @throws java.io.IOException an this occurs while reading
-     */
-    public int compare() throws java.io.IOException {
-        XMLFileReader reader1 = new XMLFileReader(_file1);
-        XMLNode node1 = reader1.read();
-
-        XMLFileReader reader2 = new XMLFileReader(_file2);
-        XMLNode node2 = reader2.read();
-
-        return compareNodes(node1, node2);
-    }
-
-    /**
-     * Compares the given XMLNodes. Returns 0 if no differences are found,
-     * otherwise returns a positive number indicating the number of differences.
-     *
-     * @param node1 the first XMLNode to compare
-     * @param node2 the second XMLNode to compare
-     * @return 0, if no differences are found, otherwise a positive number
-     *         indicating the number of differences.
-     */
-    private int compareNodes(final XMLNode node1, final XMLNode node2) {
-        // Compare node types
-        if (!hasSameType(node1, node2)) {
-            if (_print) {
-                _pw.println("Types differ: <" + node1.getLocalName() + "> and <"
-                            + node2.getLocalName() + "> for" + node1.getNodeLocation());
-            }
-            return 1;
-        }
-
-        int diffCount = 0;
-
-        String ns1 = node1.getNamespaceURI();
-        String ns2 = node2.getNamespaceURI();
-        if (!compareTextNullEqualsEmpty(ns1, ns2)) {
-            if (_print) {
-                _pw.println("Namespaces differ: ('" + ns1 + "' != '" + ns2 + "') for "
-                            + node1.getNodeLocation());
-            }
-
-            ++diffCount;
-        }
-
-        // Compare local names (if both are null it's OK)
-        String name1 = node1.getLocalName();
-        String name2 = node2.getLocalName();
-
-        if (name1 == null && name2 != null) {
-            if (_print) {
-                _pw.println("Names differ: null vs. <" + name2 + "> for "
-                            + node1.getNodeLocation());
-            }
-            ++diffCount;
-            return diffCount;
-        } else if (name2 == null && name1 != null) {
-            if (_print) {
-                _pw.println("Names differ: <" + name1 + "> vs null for "
-                            + node1.getNodeLocation());
-            }
-            ++diffCount;
-            return diffCount;
-        } else if (name1 != null && !name1.equals(name2)) {
-            if (_print) {
-                _pw.println("Names differ: <" + name1 + "> != <" + name2 + "> for "
-                            + node1.getNodeLocation());
-            }
-            ++diffCount;
-            return diffCount;
-        }
-
-        // Compare node content
-        switch (node1.getNodeType()) {
-            case XMLNode.ROOT:
-                diffCount += compareElementsStrictOrder((Root)node1, (Root)node2);
-                break;
-
-            case XMLNode.ELEMENT:
-                diffCount += compareElements((Element)node1, (Element)node2);
-                break;
-
-            case XMLNode.ATTRIBUTE:
-                diffCount += compareStringValues(node1, node2);
-                break;
-
-            case XMLNode.TEXT:
-                diffCount += compareStringValues(node1, node2);
-                break;
-
-            case XMLNode.PROCESSING_INSTRUCTION:
-                // We don't care about comparing processing instructions
-                break;
-
-            default:
-                System.out.println("Unexpected node type in XMLDiff: " + node1.getNodeType());
-                break;
-        }
-
-        return diffCount;
-    } // -- compare
-
-    /**
-     * Compares the String values of the provided XML Nodes.
-     * @param node1 The first node to be compared
-     * @param node2 The second node to be compared
-     * @return 0 if the String values are the same, 1 otherwise
-     */
-    private int compareStringValues(final XMLNode node1, final XMLNode node2) {
-        if (compareText(node1.getStringValue(), node2.getStringValue())) {
-            return 0;
-        }
-
-        if (_print) {
-            _pw.println();
-            printLocationInfo(node1, node2);
-            printText("- ", node1.getStringValue());
-            _pw.println();
-            printText("+ ", node2.getStringValue());
-        }
-        return 1;
-    }
-
-    /**
-     * Checks the attributes of the given nodes to make sure they are identical
-     * but does not care about the attribute order, as per XML 1.0.
-     */
-    private int compareAttributes(final Element node1, final Element node2) {
-        int diffCount = 0;
-
-        for (Iterator i = node1.getAttributeIterator(); i.hasNext(); ) {
-            Attribute attr1 = (Attribute) i.next();
-
-            // Does node2 have this attribute at all?
-            String attValue2 = node2.getAttribute(attr1.getNamespaceURI(), attr1.getLocalName());
-            if (attValue2 == null) {
-                // Is this an attribute that is allowed to be missing sometimes?
-                if (missingattributeIsIgnorable(attr1)) {
-                    continue;
-                }
-
-                // If not, complain
-                printElementChangeBlock(node1, node2, "Attribute '"
-                                        + attr1.getNodeLocation()
-                                        + "' does not exist in the second document.");
-                diffCount++;
-                continue;
-            }
-
-            // If it does, does it have the same value?
-            String attValue1 = attr1.getStringValue();
-            if (!compareTextLikeQName(node1, node2, attValue1, attValue2)) {
-                printElementChangeBlock(node1, node2, "Attribute '"
-                                        + attr1.getNodeLocation()
-                                        + "' values are different.");
-                diffCount++;
-            }
-        }
-
-        // Look for attributes on node 2 that are not on node 1
-        for (Iterator i = node2.getAttributeIterator(); i.hasNext(); ) {
-            Attribute attr2 = (Attribute) i.next();
-            if (node1.getAttribute(attr2.getNamespaceURI(), attr2.getLocalName()) == null) {
-                // Is this an attribute that is allowed to be missing sometimes?
-                if (missingattributeIsIgnorable(attr2)) {
-                    continue;
-                }
-
-                // If not, complain
-                printElementChangeBlock(node1, node2, "Attribute '"
-                                        + attr2.getNodeLocation()
-                                        + "' does not exist in the first document.");
-                diffCount++;
-            }
-        }
-
-        return diffCount;
-    }
-
-    private boolean missingattributeIsIgnorable(Attribute attr) {
-        String name = attr.getLocalName();
-        String ns = attr.getNamespaceURI();
-        if (ns == null) {
-            ns = "";
-        }
-
-        if (name.equals("noNamespaceSchemaLocation") && ns.equals(XMLSCHEMA_INSTANCE)) {
-            return true;
-        }
-        if (name.equals("schemaLocation") && ns.equals(XMLSCHEMA_INSTANCE)) {
-            return true;
-        }
-        return false;
-    }
-
-    /**
-     * Compare the provided attribute text as if it were a QName.
-     *
-     * @param node1 Node containing attribute 1
-     * @param node2 Node containing attribute 2
-     * @param attValue1 String value of attribute 1
-     * @param attValue2 String value of attribute 2
-     * @return true if the attributes are equal directly, or equal when compared
-     *         as QNames
-     */
-    private boolean compareTextLikeQName(final XMLNode node1, final XMLNode node2,
-                                         final String attValue1, final String attValue2) {
-        // If strings are equal, return equal
-        if (compareText(attValue1, attValue2)) {
-            return true;
-        }
-
-        // If neither attribute value has ":" then return false
-        final int idx1 = attValue1.indexOf(':');
-        final int idx2 = attValue2.indexOf(':');
-        if (idx1 < 0 && idx2 < 0) {
-            return false;
-        }
-
-        final String prefix1;
-        final String prefix2;
-        final String value1;
-        final String value2;
-
-        if (idx1 >= 0) {
-            value1 = attValue1.substring(idx1 + 1);
-            prefix1 = attValue1.substring(0, idx1);
-        } else {
-            value1 = attValue1;
-            prefix1 = "";
-        }
-
-        if (idx2 >= 0) {
-            value2 = attValue2.substring(idx2 + 1);
-            prefix2 = attValue2.substring(0, idx2);
-        } else {
-            value2 = attValue2;
-            prefix2 = "";
-        }
-
-        // Return true if text value is equal and namesspaces are equal
-        return compareText(value1, value2)
-               && compareTextNullEqualsEmpty(node1.getNamespaceURI(prefix1),
-                                             node2.getNamespaceURI(prefix2));
-    }
-
-    /**
-     * Compares the two XMLNodes, both of which must be of type XMLNode.ELEMENT
-     * or XMLNode.ROOT.
-     *
-     * @param node1 the primary XMLNode to comapare against
-     * @param node2 the XMLNode to compare against node1
-     * @return the number of differences found in this document tree
-     */
-    private int compareElements(final Element node1, final Element node2) {
-        int diffCount = compareAttributes(node1, node2);
-
-        if (_strictChildOrder) {
-            diffCount += compareElementsStrictOrder(node1, node2);
-        } else {
-            diffCount += compareElementsLooseOrder(node1, node2);
-        }
-        return diffCount;
-    }
-
-    /**
-     * Compares the two XMLNodes (not counting attributes) requiring strict
-     * child order, both of which must be of type XMLNode.ELEMENT or
-     * XMLNode.ROOT.
-     *
-     * @param node1 the primary XMLNode to comapare against
-     * @param node2 the XMLNode to compare against node1
-     * @return the number of differences found in this document tree
-     */
-    private int compareElementsStrictOrder(final ParentNode node1, final ParentNode node2) {
-        int diffCount = 0;
-
-        Iterator i1 = node1.getChildIterator();
-        Iterator i2 = node2.getChildIterator();
-
-        // Skip all ignorable whitespace and compare with strict order
-        if (i1.hasNext() && i2.hasNext()) {
-            XMLNode child1 = (XMLNode) i1.next();
-            XMLNode child2 = (XMLNode) i2.next();
-            while (child1 != null && child2 != null) {
-                if (nodeIsIgnorableText(child1)) {
-                    if (!i1.hasNext()) {
-                        break;
-                    }
-                    child1 = (XMLNode) i1.next();
-                    continue;
-                }
-                if (nodeIsIgnorableText(child2)) {
-                    if (!i2.hasNext()) {
-                        break;
-                    }
-                    child2 = (XMLNode) i2.next();
-                    continue;
-                }
-
-                diffCount += compareNodes(child1, child2);
-
-                if (!i1.hasNext() || !i2.hasNext()) {
-                    break;
-                }
-
-                child1 = (XMLNode) i1.next();
-                child2 = (XMLNode) i2.next();
-            }
-        }
-
-        // If we have excess nodes for root1, complain about missing elements
-        while (i1.hasNext()) {
-            XMLNode child1 = (XMLNode) i1.next();
-            if (!nodeIsIgnorableText(child1)) {
-                if (_print) {
-                    printLocationInfo(child1, null);
-                    _pw.println("- ");
-                }
-                ++diffCount;
-            }
-        }
-
-        // If we have excess nodes for root2, complain about extra elements
-        while (i2.hasNext()) {
-            XMLNode child2 = (XMLNode) i2.next();
-            if (!nodeIsIgnorableText(child2)) {
-                if (_print) {
-                    printLocationInfo(child2, null);
-                    _pw.println("- ");
-                }
-                ++diffCount;
-            }
-        }
-
-        return diffCount;
-    }
-
-    /**
-     * Compares the two XMLNodes, both of which must be of type XMLNode.ELEMENT
-     * or XMLNode.ROOT.
-     *
-     * @param node1 the primary XMLNode to comapare against
-     * @param node2 the XMLNode to compare against node1
-     * @return the number of differences found in this document tree
-     */
-    private int compareElementsLooseOrder(final Element node1, final Element node2) {
-        int diffCount = 0;
-
-        final List used = new LinkedList();
-
-        for (Iterator i1 = node1.getChildIterator(); i1.hasNext(); ) {
-            XMLNode child1 = (XMLNode) i1.next();
-            // Ignore whitespace
-            // If we find an exact match, continue with the next node in the list
-            if (nodeIsIgnorableText(child1) || foundExactMatch(node2, child1, used)) {
-                continue;
-            }
-
-            // Check for the best match and use it to count diffs & complain
-            if (_print) {
-                diffCount += closestMatchDifference(node2, child1, used);
-            } else {
-                diffCount++;
-            }
-        }
-
-        // Complain about all children of node2 that are not used and not ignorable whitespace
-        for (Iterator i2 = node2.getChildIterator(); i2.hasNext(); ) {
-            XMLNode child2 = (XMLNode) i2.next();
-            if (!nodeIsIgnorableText(child2) && !used.contains(child2)) {
-                if (_print) {
-                    _pw.println("Extra child node: " + child2.getNodeLocation());
-                }
-                ++diffCount;
-            }
-        }
-
-        return diffCount;
-    }
-
-    /**
-     * Looks for an exact match for the provided target XMLNode. If found,
-     * returns true. Suppresses complaints during search. If an exact match is
-     * found, the match is added to the list of "used" items.
-     *
-     * @param parent The node whose children to search for an exact match
-     * @param target The XMLNode we are trying to match
-     * @param usedList The list of children of node2 that have already matched
-     *        other objects
-     * @return true if an exact match is found for the provided node.
-     */
-    private boolean foundExactMatch(final Element parent, XMLNode target, final List usedList) {
-        // Suppress complaints when we are looking for an exact match.
-        boolean previousPrint = _print;
-
-        _print = false; // Suppress printing when we are "just looking"
-        boolean found = false;
-        for (Iterator i2 = parent.getChildIterator(); i2.hasNext(); ) {
-            XMLNode child2 = (XMLNode) i2.next();
-            if (!usedList.contains(child2) && compareNodes(target, child2) == 0) {
-                usedList.add(child2);
-                found = true;
-                break;
-            }
-        }
-
-        // Restore printing
-        _print = previousPrint;
-        return found;
-    }
-
-    /**
-     * Looks for a close patch to the provided target XMLNode among the children
-     * of the provided parent node.  The difference between the closest match
-     * and the target is returned. If we cannot even find a close match, then
-     * we declare the target missing and return one difference.
-     * <p>
-     * Note:  This method is only called when printing is enabled.
-     *
-     * @param parent The node whose children to search for an exact match
-     * @param target The XMLNode we are trying to match
-     * @param usedList The list of children of node2 that have already matched
-     *        other objects
-     * @return the difference count
-     */
-    private int closestMatchDifference(final Element parent, final XMLNode target,
-                                       final List usedList) {
-        for (Iterator i2 = parent.getChildIterator(); i2.hasNext(); ) {
-            XMLNode child2 = (XMLNode) i2.next();
-            if (!usedList.contains(child2) && hasSameType(target, child2)
-                && hasSameName(target, child2)) {
-                usedList.add(child2);
-                return compareNodes(target, child2);
-            }
-        }
-
-        _pw.println("Missing child node: " + target.getNodeLocation() + " for "
-                    + target.getNodeLocation());
-        return 1;
-    }
-
-    /**
-     * Returns true if the given node is a TEXT node that contains only
-     * ignorable whitespace.
-     *
-     * @return true if the given node is a TEXT node that contains only
-     *         ignorable whitespace.
-     */
-    private boolean nodeIsIgnorableText(final XMLNode child) {
-        return (child.getNodeType() == XMLNode.TEXT && compareText(child.getStringValue(), ""));
-    }
-
-    /**
-     * Returns true if the two Strings are equal, ignoring whitespace
-     * differences that are ignorable.
-     *
-     * @return true if the two Strings are equal, ignoring whitespace
-     *         differences that are ignorable.
-     */
-    private boolean compareText(final String s1, final String s2) {
-        if (s1.equals(s2)) {
-            return true;
-        }
-
-        // Strings are different; compare token by token to ignore whitespace differences
-        StringTokenizer st1 = new StringTokenizer(s1);
-        StringTokenizer st2 = new StringTokenizer(s2);
-
-        while (st1.hasMoreTokens() && st2.hasMoreTokens()) {
-            if (!st1.nextToken().equals(st2.nextToken())) {
-                return false;
-            }
-        }
-
-        // If the Strings have different numbers of tokens, fail
-        if (st1.hasMoreTokens() || st2.hasMoreTokens()) {
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * Compares two strings. Considers null Strings to be the same as an empty
-     * String.
-     *
-     * @param one The first string to compare.
-     * @param two The second string to compare.
-     * @return true if the two strings are equals or are both "null or empty"
-     */
-    private boolean compareTextNullEqualsEmpty(String one, String two) {
-        String text1 = (one == null) ? "" : one;
-        String text2 = (two == null) ? "" : two;
-        return text1.equals(text2);
-    }
-
-    private boolean hasSameName(final XMLNode node1, final XMLNode node2) {
-        String name1 = node1.getLocalName();
-        String name2 = node2.getLocalName();
-
-        // ROOT may or may not have null name, so we must check for possible null values
-        if (name1 == null) {
-            return (name2 == null);
-        }
-        return name1.equals(name2);
-    }
-
-    private boolean hasSameType(final XMLNode node1, final XMLNode node2) {
-        return (node1.getNodeType() == node2.getNodeType());
-    }
-
-    private void printLocationInfo(final XMLNode node1, final XMLNode node2) {
-        if (_header) {
-            _header = false;
-            _pw.println("--- " + _file1);
-            _pw.println("+++ " + _file2);
-        }
-        _pw.print("@@ -");
-        _pw.print(node1.getNodeLocation());
-        _pw.print(" +");
-        _pw.print(node2.getNodeLocation());
-        _pw.println(" @@");
-    }
-
-    private void printElementChangeBlock(final Element node1, final Element node2, final String msg) {
-        if (_print) {
-            _pw.print("- ");
-            printElement(node1);
-            _pw.print("+ ");
-            printElement(node2);
-            if (msg != null) {
-                _pw.println(msg);
-            }
-        }
-    }
-
-    private void printElement(final Element node) {
-        _pw.print('<' + node.getLocalName());
-
-        for (Iterator i = node.getAttributeIterator(); i.hasNext(); ) {
-            Attribute attr = (Attribute) i.next();
-            _pw.print(' ');
-            _pw.print(attr.getLocalName());
-            _pw.print("=\"");
-            _pw.print(attr.getStringValue());
-            _pw.print("\"");
-        }
-
-        _pw.println('>');
-    }
-
-    /**
-     * Prints the given text. Each line of the text is prefixed with the given
-     * prefix. If <code>text</code> has multiple newlines, the prefix will be
-     * printed on each line.
-     *
-     * @param prefix A prefix to display on each line of output
-     * @param text The text to display
-     */
-    private void printText(final String prefix, String text) {
-        if (text == null) {
-            _pw.println(prefix);
-            return;
-        }
-
-        int idx = 0;
-        while ((idx = text.indexOf('\n')) >= 0) {
-            _pw.print(prefix);
-            _pw.println(text.substring(0, idx));
-            text = text.substring(idx + 1);
-        }
-        _pw.print(prefix);
-        _pw.println(text);
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/XMLTestCase.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/XMLTestCase.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/java/org/exolab/castor/tests/framework/XMLTestCase.java	(working copy)
@@ -1,541 +0,0 @@
-/*
- * Redistribution and use of this software and associated documentation
- * ("Software"), with or without modification, are permitted provided
- * that the following conditions are met:
- *
- * 1. Redistributions of source code must retain copyright
- *    statements and notices.  Redistributions must also contain a
- *    copy of this document.
- *
- * 2. Redistributions in binary form must reproduce the
- *    above copyright notice, this list of conditions and the
- *    following disclaimer in the documentation and/or other
- *    materials provided with the distribution.
- *
- * 3. The name "Exolab" must not be used to endorse or promote
- *    products derived from this Software without prior written
- *    permission of Intalio, Inc.  For written permission,
- *    please contact info@exolab.org.
- *
- * 4. Products derived from this Software may not be called "Exolab"
- *    nor may "Exolab" appear in their names without prior written
- *    permission of Intalio, Inc. Exolab is a registered
- *    trademark of Intalio, Inc.
- *
- * 5. Due credit should be given to the Exolab Project
- *    (http://www.exolab.org/).
- *
- * THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
- * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
- * INTALIO, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Copyright 2001-2003 (C) Intalio, Inc. All Rights Reserved.
- *
- * $Id$
- */
-package org.exolab.castor.tests.framework;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileWriter;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.lang.reflect.Method;
-import java.util.Enumeration;
-import java.util.LinkedList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.exolab.castor.mapping.Mapping;
-import org.exolab.castor.tests.framework.testDescriptor.CallMethod;
-import org.exolab.castor.tests.framework.testDescriptor.Configuration;
-import org.exolab.castor.tests.framework.testDescriptor.ConfigurationType;
-import org.exolab.castor.tests.framework.testDescriptor.FailureType;
-import org.exolab.castor.tests.framework.testDescriptor.ListenerType;
-import org.exolab.castor.tests.framework.testDescriptor.UnitTestCase;
-import org.exolab.castor.tests.framework.testDescriptor.Value;
-import org.exolab.castor.tests.framework.testDescriptor.types.FailureStepType;
-import org.exolab.castor.tests.framework.testDescriptor.types.TypeType;
-import org.exolab.castor.util.NestedIOException;
-import org.exolab.castor.xml.MarshalException;
-import org.exolab.castor.xml.MarshalListener;
-import org.exolab.castor.xml.Marshaller;
-import org.exolab.castor.xml.UnmarshalListener;
-import org.exolab.castor.xml.Unmarshaller;
-import org.xml.sax.InputSource;
-
-/**
- * This class encapsulates all the common logic to run the test patterns for
- * Castor XML. Basically it handle the marshalling/marshalling/comparing. This
- * is used to factor the common code for the source generator test and the
- * mapping/introspection tests as only the setup differ in the test patterns.
- * <p>
- * This class is not complete and expects to be extended.
- *
- * @author <a href="mailto:gignoux@kernelcenter.org">Sebastien Gignoux</a>
- * @author <a href="mailto:blandin@intalio.com">Arnaud Blandin</a>
- * @version $Revision$ $Date: 2006-04-26 15:14:53 -0600 (Wed, 26 Apr 2006) $
- */
-public abstract class XMLTestCase extends TestCase {
-
-    /** True if we desire a lot of info on what happen. */
-    protected static boolean _verbose;
-    /** True if we dump the stack trace for any exception that occurs during testing. */
-    protected static boolean _printStack;
-
-    static {
-        String v = System.getProperty(TestCaseAggregator.VERBOSE_PROPERTY);
-        _verbose = (v!=null && v.equals(Boolean.TRUE.toString()));
-
-        v = System.getProperty(TestCaseAggregator.PRINT_STACK_TRACE);
-        _printStack = (v!=null && v.equals(Boolean.TRUE.toString()));
-    }
-
-    /** Name of the test suite to which this test belongs. */
-    protected String               _suiteName;
-    /** The name of the root class for this test.  Must be set by a concrete class
-     * if a test with a random object is used. */
-    protected String               _rootClassName;
-    /** The root class for this test.  Must be set by a concrete class. */
-    protected Class                _rootClass;
-    /** If true, the dumpFields() function has been implemented in the root class. */
-    protected boolean              _hasDump;
-    /** The name of the mapping file to use in a Marshalling Framework Test Case.
-     * Must be set by a concrete class if a test with a reference document is used. */
-    protected Mapping              _mapping;
-    /** A listener for marshalling. */
-    protected Object               _listener;
-    /** Type of listener test -- Marshal, Unmarshal or Both. */
-    protected TypeType             _listenerType;
-    /** Gold file for listener. */
-    protected String               _listenerGoldFile;
-    /** The Configuration the Marshalling Framework. */
-    protected Configuration        _configuration;
-    /** Name of this test. */
-    protected final String         _name;
-    /** The unit test case this class represent. */
-    protected final UnitTestCase   _unitTest;
-    /** Place where the temporary file have to be put. */
-    protected final File           _outputRootFile;
-    /** True if the test needs to be skipped. */
-    protected final boolean        _skip;
-    /** The failure object that is not null if the test is expected to fail. */
-    protected final FailureType    _failure;
-    /** Used only to retrieve the classloader. */
-    protected final CastorTestCase _test;
-
-    /**
-     * Instantiate a new XMLTestCase with the given name.
-     *
-     * @param name the name of this test case.
-     */
-    public XMLTestCase(final String name) {
-        super(name);
-        _name = cleanup(name);
-        throw new IllegalArgumentException("You cannot use the name-only constructor");
-    }
-
-    /**
-     * Instantiates a new test case that represents the given UnitTestCase.
-     *
-     * @param test the reference to the jar/directory
-     * @param unit the UnitTestCase that wraps the configuration for this XML Test case.
-     */
-    public XMLTestCase(final CastorTestCase test, final UnitTestCase unit) {
-        super(unit.getName());
-        _name           = cleanup(unit.getName());
-        _unitTest       = unit;
-        _skip           = unit.getSkip();
-        _failure        = unit.getFailure();
-        _test           = test;
-        _outputRootFile = test.getOutputRootFile();
-    }
-
-    /**
-     * Instantiates a new test cases that has the same configuration of the given
-     * test case.
-     *
-     * @param name the name of the test case
-     * @param tc the XML test case that hold the configuration for this test case
-     */
-    public XMLTestCase(final String name, final XMLTestCase tc) {
-        super(name);
-        _name           = cleanup(tc._name);
-        _unitTest       = tc._unitTest;
-        _outputRootFile = tc._outputRootFile;
-        _skip           = tc._skip;
-        _failure        = tc._failure;
-        _test           = tc._test;
-    }
-
-    /**
-     * Returns a version of the input name that is suitable for JUnit test case
-     * or test suite use. Apparently, JUnit truncates test case names after
-     * encountering certain characters, so we scrub those characters from the
-     * test case or test suite name.
-     * <p>
-     * We also translate all whitespace to blanks, remove all leading and
-     * trailing whitespace, and collapse consecutive whitespace to a single
-     * blank.
-     *
-     * @param name
-     *            the input name
-     * @return a name suitable for JUnit test case or test suite use.
-     */
-    static String cleanup(final String name) {
-        return name.replaceAll("[\\*()\\t\\n\\r\\f]", " ").replaceAll(" {2,}", " ").trim();
-    }
-
-    /**
-     * Sets the name of the test suite to which this test case belongs to.
-     *
-     * @param suiteName the name of the test suite.
-     *
-     */
-    public void setTestSuiteName(final String suiteName) {
-        _suiteName = cleanup(suiteName);
-    }
-
-    /**
-     * Returns the name of the test suite to which this test case belongs to.
-     * @return the name of the test suite to which this test case belongs to.
-     */
-    public String getTestSuiteName() {
-        return _suiteName;
-    }
-
-    /**
-     * Called when a test case throws an Exception. Returns true if we expected
-     * this test to fail (and if this was the correct Exception class, if one is
-     * specified, and if this was the correct test step for the failure to
-     * occur, if one was specified).
-     *
-     * @param exception
-     *            the Exception that was thrown
-     * @param checkStep
-     *            the test step that threw an Exception
-     * @return true if we pass the test (because we expected this Exception)
-     */
-    protected boolean checkExceptionWasExpected(final Exception exception, final FailureStepType checkStep) {
-        if (_printStack) {
-            exception.printStackTrace();
-        }
-        // If we're not expecting any failure, then we're not expecting any Exception
-        if (_failure == null || !_failure.getContent()) {
-            return false;
-        }
-        if (checkStep == null) {
-            fail("CTF coding failure ... checkStep should never be null");
-        }
-
-        // We expect failure.  Is this the failure we expected?
-
-        String          exceptionName = _failure.getException();
-        FailureStepType expectedStep  = _failure.getFailureStep();
-
-        // If no specific step or Exception, then any failure is OK
-        if (exceptionName == null && expectedStep == null) {
-            return true;
-        }
-
-        // If we're expecting an exception, make sure we got the right one
-        Exception ex = exception;
-        if (ex instanceof NestedIOException) {
-            ex = ((NestedIOException)ex).getException();
-        }
-
-        if (exceptionName != null) {
-            try {
-                Class expected = Class.forName(exceptionName);
-                if (!expected.isAssignableFrom(ex.getClass())) {
-                    String complaint = "Received Exception: '" + ex.getClass().getName()
-                            + ": " + ex + "' but expected: '" + exceptionName + "'.";
-
-                    StringWriter sw = new StringWriter();
-                    PrintWriter pw = new PrintWriter(sw);
-                    pw.print(complaint);
-                    if (_verbose) {
-                        pw.println("Stacktrace for the Exception that was thrown:");
-                        ex.printStackTrace(pw);
-                    }
-                    pw.flush();
-                    System.out.println(sw.toString());
-
-                    fail(complaint);
-                }
-
-            } catch (ClassNotFoundException cnfex) {
-                fail("The Exception specified: '" + exceptionName + "' cannot be found in the CLASSPATH");
-            }
-        }
-
-        // If we're expecting to fail at a specific step, make sure this is that step
-        if (expectedStep != null && !expectedStep.equals(checkStep)) {
-            fail("We expected to fail at test step '" + expectedStep.toString()
-                 + "' but actually failed at step '" + checkStep.toString() + "'");
-        }
-
-        // We got the expected failure!  Return true.
-        return true;
-    }
-
-    /**
-     * Marshals the object with the configuration of the test.
-     *
-     * @param object the object to marshall.
-     * @param fileName the name of the file where to marshall the object.
-     * @return a file containing marshalled output.
-     */
-    protected File testMarshal(final Object object, final String fileName) {
-        verbose("--> Marshaling to: '" + fileName + "'");
-
-        File marshalOutput = new File(_outputRootFile, fileName);
-
-        try {
-            Marshaller marshaller = createMarshaler(marshalOutput);
-            marshaller.marshal(object);
-        } catch (Exception e) {
-            if (!checkExceptionWasExpected(e, FailureStepType.MARSHAL_TO_DISK)) {
-                fail("Exception marshaling to disk " + e);
-            }
-            return null;
-        }
-
-        if (_failure != null && _failure.getContent() && _failure.getFailureStep() != null &&
-             _failure.getFailureStep().equals(FailureStepType.MARSHAL_TO_DISK)) {
-            fail("Unmarshaling was expected to fail, but succeeded");
-        }
-        return marshalOutput;
-    }
-
-    private Marshaller createMarshaler(final File marshalOutput) throws Exception {
-        Marshaller marshaller = new Marshaller(new FileWriter(marshalOutput));
-
-        //-- Configuration for marshaler?  Use config from unit test case if available
-        Configuration config = _unitTest.getConfiguration();
-        if (config == null) {
-            config = _configuration;
-        }
-
-        if (config != null) {
-            ConfigurationType marshal = config.getMarshal();
-            List returnValues = invokeEnumeratedMethods(marshaller, marshal);
-            returnValues.clear(); // We don't care about the return values
-        }//-- config != null
-
-        if (_mapping != null) {
-            marshaller.setMapping(_mapping);
-        }
-
-        if (_listener != null && _listener instanceof MarshalListener
-                && _listenerType.getType() != TypeType.UNMARSHAL_TYPE) {
-            marshaller.setMarshalListener((MarshalListener)_listener);
-        }
-        return marshaller;
-    }
-
-    /**
-     * Unmarshals the given file with the configuration of that test. If we
-     * unmarshal null, complain and fail the test case.
-     *
-     * @param file the file containing the xml document to unmarshall.
-     * @return the result of the unmarshalling of the given file.
-     * @throws Exception if anything goes wrong during the test
-     */
-    protected Object testUnmarshal(final File file) throws Exception {
-        verbose("--> Unmarshaling '" + file.getName() + "'\n");
-        InputStream inputStream = new FileInputStream(file);
-        Object unmarshaledObject = testUnmarshal(inputStream);
-        inputStream.close();
-        assertNotNull("Unmarshaling '" + file.getName() + "' results in a NULL object.",
-                      unmarshaledObject);
-        return unmarshaledObject;
-    }
-
-    /**
-     * Unmarshals the given input stream with the configuration of that test.
-     *
-     * @param stream
-     *            the input stream containing the xml document to unmarshall.
-     * @return the result of the unmarshalling of the given file, null if
-     *         anything went wrong.
-     * @throws Exception if anything goes wrong during the test
-     */
-    protected Object testUnmarshal(final InputStream stream) throws Exception {
-        Object result = null;
-        final Unmarshaller unmar = createUnmarshaler();
-        result = unmar.unmarshal(new InputSource(stream));
-        return result;
-    }
-
-    private Unmarshaller createUnmarshaler() throws Exception {
-        //-- Configuration for unmarshaler?  Use config from unit test case if available
-        Configuration config = _unitTest.getConfiguration();
-        if (config == null) {
-            config = _configuration;
-        }
-
-        final Unmarshaller unmar;
-        if (_mapping != null) {
-            unmar = new Unmarshaller(_mapping);
-        } else {
-            if (_test.getClassLoader() != null) {
-                unmar = new Unmarshaller(_rootClass, _test.getClassLoader());
-            } else {
-                unmar = new Unmarshaller(_rootClass);
-            }
-        }
-
-        if (_listener != null && _listener instanceof UnmarshalListener
-                && _listenerType.getType() != TypeType.MARSHAL_TYPE) {
-            unmar.setUnmarshalListener((UnmarshalListener)_listener);
-        }
-
-        unmar.setDebug(_verbose);
-
-        if (config != null) {
-            ConfigurationType unmarshal = config.getUnmarshal();
-            List returnValues = invokeEnumeratedMethods(unmar, unmarshal);
-            returnValues.clear(); // We don't care about the return values
-        }
-
-        return unmar;
-    }
-
-    /**
-     * Invokes all requested methods on the object we are supplied.  Keeps track
-     * of the objects returned from each invocation and returns a List containing
-     * all of the return values.  Some of the return values may be null.  This
-     * is not an error!
-     *
-     * @param objectInvoked the object on which to invoke the methods
-     * @param config configuration object listing the methods we are to call
-     * @throws java.lang.Exception if anything goes wrong during the test
-     */
-    protected List invokeEnumeratedMethods(final Object objectInvoked, final ConfigurationType config)
-                                                                  throws java.lang.Exception {
-        final List returnValues = new LinkedList();
-
-        if (config == null) {
-            return returnValues;
-        }
-
-        Enumeration methods = config.enumerateCallMethod();
-        //-- For each method defined, we invoke it on marshaller just created.
-        while (methods.hasMoreElements()) {
-            CallMethod method = (CallMethod) methods.nextElement();
-            //-- search for the method to invoke
-            Method toBeinvoked = getInvokeMethod(objectInvoked.getClass(), method.getName(), method.getValue());
-            //-- construct the objects representing the arguments of the method
-            Object[] arguments = getArguments(method.getValue());
-            //-- Invoke the method and keep a copy of the returned object
-            returnValues.add(toBeinvoked.invoke(objectInvoked, arguments));
-        }
-
-        return returnValues;
-    }
-
-    /**
-     * Initialize listeners for marshalling/unmarshalling
-     *
-     * @param listener the listener to initialize
-     * @throws ClassNotFoundException
-     * @throws IllegalAccessException
-     * @throws InstantiationException
-     */
-    protected void initializeListeners(final ListenerType listener) throws ClassNotFoundException,
-                                                                     IllegalAccessException,
-                                                                     InstantiationException {
-        String listenerClassName = listener.getClassName();
-        if (listenerClassName == null || listenerClassName.length() == 0) {
-            throw new IllegalArgumentException("ClassName must be provided for Listener element.");
-        }
-
-        final Class listenerClass;
-        if (_test.getClassLoader() != null) {
-            listenerClass = _test.getClassLoader().loadClass(listenerClassName);
-        } else {
-            listenerClass = Thread.currentThread().getContextClassLoader().loadClass(listenerClassName);
-        }
-
-        Object o = listenerClass.newInstance();
-        if (o instanceof UnmarshalListener || o instanceof MarshalListener) {
-            _listener = o;
-        } else {
-            _listener = null;
-        }
-
-        _listenerGoldFile = listener.getGoldFile();
-        _listenerType = listener.getType();
-    }
-
-    /**
-     * Returns an instance of the object model hardcoded in the given
-     * ObjectModelBuilder.
-     *
-     * @param builderName the name of the class used as a builder
-     * @return an instance of the object model hardcoded in the given
-     *         ObjectModelBuilder.
-     * @throws java.lang.Exception if anything goes wrong during the test
-     */
-    protected Object buildObjectModel(final String builderName) throws java.lang.Exception {
-        Class builderClass = null;
-        if (_test.getClassLoader() != null) {
-            builderClass = _test.getClassLoader().loadClass(builderName);
-        } else {
-            builderClass = this.getClass().getClassLoader().loadClass(builderName);
-        }
-        ObjectModelBuilder builder = (ObjectModelBuilder)builderClass.newInstance();
-        return builder.buildInstance();
-    }
-
-    private Method getInvokeMethod(final Class dataBinder, final String methodName,
-                                   final Value[] values)
-                                 throws ClassNotFoundException, NoSuchMethodException {
-        if (methodName == null) {
-            throw new IllegalArgumentException("The name of the method to invoke is null");
-        }
-        Class[] argumentsClass = null;
-
-        //-- the value object represents the arguments of the method if any
-        if (values != null && values.length > 0) {
-            argumentsClass = new Class[values.length];
-            for (int i = 0; i < values.length; i++) {
-                Value value = values[i];
-                argumentsClass[i] = CTFUtils.getClass(value.getType(), _test.getClassLoader());
-            }
-        }
-        return dataBinder.getMethod(methodName, argumentsClass);
-    }
-
-    private Object[] getArguments(final Value[] values) throws ClassNotFoundException, MarshalException {
-        Object[] result = new Object[values.length];
-        for (int i = 0; i < values.length; i++) {
-            Value value = values[i];
-            result[i] = CTFUtils.instantiateObject(value.getType(), value.getContent(), _test.getClassLoader());
-        }
-        return result;
-    }
-
-    /**
-     * print the message if in verbose mode.
-     * @param message the message to print
-     */
-    protected void verbose(final String message) {
-        if (_verbose) {
-            System.out.println(message);
-        }
-    }
-
-}
Index: /home/ekuns/workspace/castor-4/xmlctf/src/main/resources/META-INF/MANIFEST.MF
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/src/main/resources/META-INF/MANIFEST.MF	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/src/main/resources/META-INF/MANIFEST.MF	(working copy)
@@ -1,11 +1,10 @@
 Manifest-Version: 1.0
 Specification-Title: Castor XML-CTF
 Specification-Vendor: Intalio Inc.
-Specification-Version: 0.8
+Specification-Version: $VERSION$$RELEASE$
 Implementation-Title: Castor
 Implementation-Vendor: Intalio Inc.
 Implementation-Version: $VERSION$$RELEASE$
-Class-Path: xerces.jar jdbc-se2.0.jar jndi.jar jta1.0.1.jar
 
-Name: org/exolab/castor/tests/
+Name: org/castor/xmlctf/
 Sealed: true
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/introspection/ComplexType-DirectAccess/Builder.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/introspection/ComplexType-DirectAccess/Builder.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/introspection/ComplexType-DirectAccess/Builder.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -42,7 +42,7 @@
  *
  */
 
-import org.exolab.castor.tests.framework.ObjectModelBuilder;
+import org.castor.xmlctf.ObjectModelBuilder;
 
 public class Builder implements ObjectModelBuilder {
 
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/introspection/ComplexType-DirectAccess/Data.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/introspection/ComplexType-DirectAccess/Data.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/introspection/ComplexType-DirectAccess/Data.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -42,8 +42,8 @@
  *
  */
 
-import org.exolab.castor.tests.framework.CastorTestable;
-import org.exolab.castor.tests.framework.RandomHelper;
+import org.castor.xmlctf.CastorTestable;
+import org.castor.xmlctf.RandomHelper;
 
 public class Data implements CastorTestable {
     private static final int MAX_DEPTH = 30;
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/introspection/ComplexType-DirectAccess/Root.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/introspection/ComplexType-DirectAccess/Root.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/introspection/ComplexType-DirectAccess/Root.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -42,8 +42,8 @@
  *
  */
 
-import org.exolab.castor.tests.framework.CastorTestable;
-import org.exolab.castor.tests.framework.RandomHelper;
+import org.castor.xmlctf.CastorTestable;
+import org.castor.xmlctf.RandomHelper;
 
 public class Root implements CastorTestable {
     private static final int MAX_DEPTH = 30;
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/introspection/SimpleType-DirectAccess/Builder.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/introspection/SimpleType-DirectAccess/Builder.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/introspection/SimpleType-DirectAccess/Builder.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -42,7 +42,7 @@
  *
  */
 
-import org.exolab.castor.tests.framework.ObjectModelBuilder;
+import org.castor.xmlctf.ObjectModelBuilder;
 
 import java.util.Date;
 import java.text.DateFormat;
@@ -50,11 +50,9 @@
 public class Builder implements ObjectModelBuilder {
 
     /**
-     * Build the object we expect when we unmarshal 'input-1.xml'
+     * Build the object we expect when we unmarshal 'input-1.xml'.
      */
-    public Object buildInstance()
-     throws Exception {
-
+    public Object buildInstance() throws Exception {
         Root r = new Root();
 
         r.type_string = "This is a Test";
@@ -71,7 +69,6 @@
         r.type_char = 'x';
 
         return r;
-
     }
 
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/introspection/SimpleType-DirectAccess/Root.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/introspection/SimpleType-DirectAccess/Root.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/introspection/SimpleType-DirectAccess/Root.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -45,8 +45,8 @@
 import java.math.BigDecimal;
 import java.util.Date;
 
-import org.exolab.castor.tests.framework.CastorTestable;
-import org.exolab.castor.tests.framework.RandomHelper;
+import org.castor.xmlctf.CastorTestable;
+import org.castor.xmlctf.RandomHelper;
 
 public class Root implements CastorTestable {
 
@@ -63,12 +63,12 @@
 
     // private byte[]   type_bytes; ####################
 
-
     // --- CastorTestable ------------------------
-    public boolean equals(Object object) {
 
-        if ( ! (object instanceof Root))
+    public boolean equals(Object object) {
+        if ( ! (object instanceof Root)) {
             return false;
+        }
 
         Root root = (Root)object;
 
@@ -74,10 +74,11 @@
 
         boolean result = true;
 
-        if ((type_string != null) && (root.type_string != null))
+        if ((type_string != null) && (root.type_string != null)) {
             result &= (type_string.equals(root.type_string));
-        else
+        } else {
             result &= (type_string == null) && (root.type_string == null);
+        }
 
         result &= (type_int     == root.type_int);
         result &= (type_long    == root.type_long);
@@ -85,17 +86,19 @@
         result &= (type_double  == root.type_double);
         result &= (type_float   == root.type_float);
 
-        if ((type_bigDecimal != null) && (root.type_bigDecimal != null))
+        if ((type_bigDecimal != null) && (root.type_bigDecimal != null)) {
             result &= (type_bigDecimal.equals(root.type_bigDecimal));
-        else
+        } else {
             result &= (type_bigDecimal == null) && (root.type_bigDecimal == null);
+        }
 
         result &= (type_byte == root.type_byte);
 
-        if ((type_date != null) && (root.type_date != null))
+        if ((type_date != null) && (root.type_date != null)) {
             result &= (type_date.equals(root.type_date));
-        else
+        } else {
             result &= (type_date == null) && (root.type_date == null);
+        }
 
         result &= (type_char == root.type_char);
 
@@ -102,9 +105,7 @@
         return result;
     }
 
-    public void randomizeFields() 
-        throws InstantiationException, IllegalAccessException {
-
+    public void randomizeFields() throws InstantiationException, IllegalAccessException {
         type_string  = RandomHelper.getRandom(type_string, String.class);
         type_int     = RandomHelper.getRandom(type_int);
         type_long    = RandomHelper.getRandom(type_long);
@@ -133,4 +134,5 @@
 
         return dump;
     }
+
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Class_inheritance/A.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Class_inheritance/A.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Class_inheritance/A.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -39,14 +39,11 @@
  * OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * Copyright 2002 (C) Intalio, Inc. All Rights Reserved.
- *
  */
 
-
-import org.exolab.castor.tests.framework.CastorTestable;
-import org.exolab.castor.tests.framework.RandomHelper;
-import org.exolab.castor.tests.framework.CompareHelper;
-
+import org.castor.xmlctf.CastorTestable;
+import org.castor.xmlctf.RandomHelper;
+import org.castor.xmlctf.CompareHelper;
 
 public class A implements CastorTestable {
 
@@ -53,7 +50,6 @@
     private int _number;
     private String _item;
 
-    //--
     public void setNumber(int i) {
         _number = i;
     }
@@ -62,7 +58,6 @@
         return _number;
     }
 
-    //--
     public void setItem(String item) {
         _item = item;
     }
@@ -71,12 +66,12 @@
         return _item;
     }
 
-
     // --- CastorTestable ------------------------
-    public boolean equals(Object object) {
 
-        if ( ! (object instanceof A))
+    public boolean equals(Object object) {
+        if ( ! (object instanceof A)) {
             return false;
+        }
 
         A a = (A)object;
         if (!_item.equals(a.getItem())) return false;
@@ -83,20 +78,13 @@
         if ( _number != a.getNumber() ) return false;
         return true;
     }
-    
+
     public String dumpFields() {
-        String dump = new String();
-
-        dump += "[Number=" + _number + "]\n";
-        dump += "[Item=" + _item + "]\n";
-        
-        return dump;
+        return "[Number=" + _number + "]\n" + "[Item=" + _item + "]\n";
     }
 
-    public void randomizeFields()
-        throws InstantiationException, IllegalAccessException {
-
+    public void randomizeFields() throws InstantiationException, IllegalAccessException {
         // Not Implemented
+    }
 
-    }
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Class_inheritance/B.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Class_inheritance/B.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Class_inheritance/B.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -42,17 +42,14 @@
  *
  */
 
-
-import org.exolab.castor.tests.framework.CastorTestable;
-import org.exolab.castor.tests.framework.RandomHelper;
-import org.exolab.castor.tests.framework.CompareHelper;
-
+import org.castor.xmlctf.CastorTestable;
+import org.castor.xmlctf.RandomHelper;
+import org.castor.xmlctf.CompareHelper;
 
 public class B extends A {
-    
+
     private String _id;
 
-    //--
     public void setId(String id) {
         _id = id;
     }
@@ -62,10 +59,11 @@
     }
 
     // --- CastorTestable ------------------------
+
     public boolean equals(Object object) {
-
-        if ( ! (object instanceof B))
+        if ( ! (object instanceof B)) {
             return false;
+        }
 
         B b = (B)object;
         if (!getItem().equals(b.getItem())) return false;
@@ -72,23 +70,14 @@
         if (getNumber() != b.getNumber()) return false;
         if (!_id.equals(b.getId())) return false;
         return true;
-    
     }
-    
+
     public String dumpFields() {
-        String dump = new String();
-
-        dump += "[Number=" + getNumber() + "]\n";
-        dump += "[Item=" + getItem() + "]\n";
-        dump += "[Id=" + _id + "]\n";
-        
-        return dump;
+        return "[Number=" + getNumber() + "]\n" + "[Item=" + getItem() + "]\n" + "[Id=" + _id + "]\n";
     }
 
-    public void randomizeFields()
-        throws InstantiationException, IllegalAccessException {
-
+    public void randomizeFields() throws InstantiationException, IllegalAccessException {
         // Not Implemented
+    }
 
-    }
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Class_inheritance/Builder.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Class_inheritance/Builder.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Class_inheritance/Builder.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -42,21 +42,19 @@
  *
  */
 
-import org.exolab.castor.tests.framework.ObjectModelBuilder;
+import org.castor.xmlctf.ObjectModelBuilder;
 
 public class Builder implements ObjectModelBuilder {
 
-    public Builder() {}
-
     /**
-     * Build the object we expect when we unmarshal 'input.xml'
+     * Build the object we expect when we unmarshal 'input.xml'.
      */
     public Object buildInstance() {
-        
         B b = new B();
         b.setId("Id");
         b.setItem("Castor");
-        b.setNumber(1213); 
+        b.setNumber(1213);
         return b;
     }
+
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/A.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/A.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/A.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -42,11 +42,9 @@
  *
  */
 
-
-import org.exolab.castor.tests.framework.CastorTestable;
-import org.exolab.castor.tests.framework.RandomHelper;
-import org.exolab.castor.tests.framework.CompareHelper;
-
+import org.castor.xmlctf.CastorTestable;
+import org.castor.xmlctf.RandomHelper;
+import org.castor.xmlctf.CompareHelper;
 
 public class A implements CastorTestable {
 
@@ -53,7 +51,6 @@
     private B     _b;
     private XandZ _xz;
 
-    //--
     public void setXandZ(XandZ xz) {
         _xz = xz;
     }
@@ -62,7 +59,6 @@
         return _xz;
     }
 
-    //--
     public void setB(B b) {
         _b = b;
     }
@@ -71,34 +67,32 @@
         return _b;
     }
 
+    // --- CastorTestable ------------------------
 
-    // --- CastorTestable ------------------------
     public boolean equals(Object object) {
-
-        if ( ! (object instanceof A))
+        if ( ! (object instanceof A)) {
             return false;
+        }
 
         A a = (A)object;
-        
+
         if (!CompareHelper.equals(this.getB(),     a.getB()))     return false;
         if (!CompareHelper.equals(this.getXandZ(), a.getXandZ())) return false;
-        
+
         return true;
     }
-    
+
     public String dumpFields() {
-        String dump = new String();
-
-        dump += "[B=" + ((getB() == null)? "null" : ((CastorTestable)getB()).dumpFields()) + "]\n";
-        dump += "[XandZ=" + ((getXandZ() == null)? "null" : ((CastorTestable)getXandZ()).dumpFields()) + "]\n";
-        
-        return dump;
+        return "[B="
+               + ((getB() == null) ? "null" : ((CastorTestable) getB()).dumpFields())
+               + "]\n"
+               + "[XandZ="
+               + ((getXandZ() == null) ? "null" : ((CastorTestable) getXandZ()).dumpFields())
+               + "]\n";
     }
 
-    public void randomizeFields()
-        throws InstantiationException, IllegalAccessException {
-
+    public void randomizeFields() throws InstantiationException, IllegalAccessException {
         // Not Implemented
-
     }
+
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/B.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/B.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/B.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -42,10 +42,9 @@
  *
  */
 
-
-import org.exolab.castor.tests.framework.CastorTestable;
-import org.exolab.castor.tests.framework.RandomHelper;
-import org.exolab.castor.tests.framework.CompareHelper;
+import org.castor.xmlctf.CastorTestable;
+import org.castor.xmlctf.RandomHelper;
+import org.castor.xmlctf.CompareHelper;
 
 public class B implements CastorTestable {
 
@@ -60,30 +59,23 @@
     }
 
     // --- CastorTestable ------------------------
+
     public boolean equals(Object object) {
-
-        if ( ! (object instanceof B))
+        if ( ! (object instanceof B)) {
             return false;
+        }
 
         B b = (B)object;
 
-        if (!CompareHelper.equals(this.getName(), b.getName())) return false;
-    
-        return true;
+        return CompareHelper.equals(this.getName(), b.getName());
     }
 
     public String dumpFields() {
-        String dump = new String();
-
-        dump += "[Name=" + ((getName() == null)? "null" : getName()) + "]\n";
- 
-        return dump;
+        return "[Name=" + ((getName() == null) ? "null" : getName()) + "]\n";
     }
 
-    public void randomizeFields()
-        throws InstantiationException, IllegalAccessException {
-
+    public void randomizeFields() throws InstantiationException, IllegalAccessException {
         // Not Implemented
-
     }
+
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/Builder.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/Builder.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/Builder.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -42,17 +42,14 @@
  *
  */
 
-import org.exolab.castor.tests.framework.ObjectModelBuilder;
+import org.castor.xmlctf.ObjectModelBuilder;
 
 public class Builder implements ObjectModelBuilder {
 
-    public Builder() {}
-
     /**
-     * Build the object we expect when we unmarshal 'input.xml'
+     * Build the object we expect when we unmarshal 'input.xml'.
      */
     public Object buildInstance() {
-        
         A a = new A();
 
         XandZ xz = new XandZ();
@@ -57,47 +54,34 @@
 
         XandZ xz = new XandZ();
         a.setXandZ(xz);
-        {
-            xz.setW("errt");
-            xz.setY(314159);
 
-            X x = new X();
-            xz.setX(x);
-            {
-                x.setId(12);
-                x.setContent(" content of X");
-            }
-            
-            X z = new X();
-            xz.setZ(z);
-            {
-                z.setId(34);
-                z.setContent("ZZZ");
-            }
+        xz.setW("errt");
+        xz.setY(314159);
 
-            RandS rs = new RandS();
-            xz.setRandS(rs);
-            {
-                rs.setT(32345);
-                rs.setU("This is U");
+        X x = new X();
+        xz.setX(x);
+        x.setId(12);
+        x.setContent(" content of X");
 
-                R r = new R();
-                rs.setR(r);
-                {
-                    r.setId(5454);
-                    r.setContent("Street");
-                }
+        X z = new X();
+        xz.setZ(z);
+        z.setId(34);
+        z.setContent("ZZZ");
 
-                R s = new R();
-                rs.setS(s);
-                {
-                    s.setId(4344);
-                    s.setContent("staire on top");
-                }
+        RandS rs = new RandS();
+        xz.setRandS(rs);
+        rs.setT(32345);
+        rs.setU("This is U");
 
-            }
+        R r = new R();
+        rs.setR(r);
+        r.setId(5454);
+        r.setContent("Street");
 
-        }
+        R s = new R();
+        rs.setS(s);
+        s.setId(4344);
+        s.setContent("staire on top");
 
         B b = new B();
         a.setB(b);
@@ -103,7 +87,7 @@
         a.setB(b);
         b.setName("test for B");
 
-
         return a;
     }
+
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/R.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/R.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/R.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -42,17 +42,15 @@
  *
  */
 
-
-import org.exolab.castor.tests.framework.CastorTestable;
-import org.exolab.castor.tests.framework.RandomHelper;
-import org.exolab.castor.tests.framework.CompareHelper;
+import org.castor.xmlctf.CastorTestable;
+import org.castor.xmlctf.RandomHelper;
+import org.castor.xmlctf.CompareHelper;
 
 public class R implements CastorTestable {
 
-    private int _id;
+    private int    _id;
     private String _content;
 
-    //--
     public void setId(int id) {
         _id = id;
     }
@@ -61,7 +59,6 @@
         return _id;
     }
 
-    //--
     public void setContent(String content) {
         _content = content;
     }
@@ -71,10 +68,11 @@
     }
 
     // --- CastorTestable ------------------------
+
     public boolean equals(Object object) {
-
-        if ( ! (object instanceof R))
+        if ( ! (object instanceof R)) {
             return false;
+        }
 
         R r = (R)object;
 
@@ -80,7 +78,7 @@
 
         if (this.getId() != r.getId()) return false;
         if (!CompareHelper.equals(this.getContent(), r.getContent())) return false;
-    
+
         return true;
     }
 
@@ -85,18 +83,11 @@
     }
 
     public String dumpFields() {
-        String dump = new String();
-
-        dump += "[Id=" + getId() + "]\n";
-        dump += "[Name=" + ((getContent() == null)? "null" : getContent()) + "]\n";
- 
-       return dump;
+        return "[Id=" + getId() + "]\n" + "[Name=" + ((getContent() == null)? "null" : getContent()) + "]\n";
     }
 
-    public void randomizeFields()
-        throws InstantiationException, IllegalAccessException {
-
+    public void randomizeFields() throws InstantiationException, IllegalAccessException {
         // Not Implemented
+    }
 
-    }
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/RandS.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/RandS.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/RandS.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -42,20 +42,17 @@
  *
  */
 
-
-import org.exolab.castor.tests.framework.CastorTestable;
-import org.exolab.castor.tests.framework.RandomHelper;
-import org.exolab.castor.tests.framework.CompareHelper;
-
+import org.castor.xmlctf.CastorTestable;
+import org.castor.xmlctf.RandomHelper;
+import org.castor.xmlctf.CompareHelper;
 
 public class RandS implements CastorTestable {
 
-    private R _r;
-    private R _s;
-    private int _t;
+    private R      _r;
+    private R      _s;
+    private int    _t;
     private String _u;
 
-    //--
     public void setT(int t) {
         _t = t;
     }
@@ -64,7 +61,6 @@
         return _t;
     }
 
-    //--
     public void setU(String u) {
         _u = u;
     }
@@ -73,7 +69,6 @@
         return _u;
     }
 
-    //--
     public void setR(R r) {
         _r = r;
     }
@@ -82,7 +77,6 @@
         return _r;
     }
 
-    //--
     public void setS(R s) {
         _s = s;
     }
@@ -92,10 +86,11 @@
     }
 
     // --- CastorTestable ------------------------
-    public boolean equals(Object object) {
 
-        if ( ! (object instanceof RandS))
+    public boolean equals(Object object) {
+        if ( ! (object instanceof RandS)) {
             return false;
+        }
 
         RandS rs = (RandS)object;
 
@@ -103,7 +98,7 @@
         if (!CompareHelper.equals(this.getS(), rs.getS())) return false;
         if (this.getT() != rs.getT()) return false;
         if (!CompareHelper.equals(this.getU(), rs.getU())) return false;
-    
+
         return true;
     }
 
@@ -108,20 +103,19 @@
     }
 
     public String dumpFields() {
-        String dump = new String();
-
-        dump += "[R=" + ((getR() == null)? "null" : ((CastorTestable)getR()).dumpFields()) + "]\n";
-        dump += "[S=" + ((getS() == null)? "null" : ((CastorTestable)getS()).dumpFields()) + "]\n";
-        dump += "[T=" + getT() + "]\n";
-        dump += "[U=" + ((getU() == null)? "null" : getU()) + "]\n";
-
-        return dump;
+        return "[R="
+               + ((getR() == null) ? "null" : ((CastorTestable) getR()).dumpFields())
+               + "]\n"
+               + "[S="
+               + ((getS() == null) ? "null" : ((CastorTestable) getS()).dumpFields())
+               + "]\n"
+               + "[T=" + getT() + "]\n"
+               + "[U="
+               + ((getU() == null) ? "null" : getU()) + "]\n";
     }
 
-    public void randomizeFields()
-        throws InstantiationException, IllegalAccessException {
-
+    public void randomizeFields() throws InstantiationException, IllegalAccessException {
         // Not Implemented
+    }
 
-    }
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/X.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/X.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/X.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -42,18 +42,15 @@
  *
  */
 
-
-import org.exolab.castor.tests.framework.CastorTestable;
-import org.exolab.castor.tests.framework.RandomHelper;
-import org.exolab.castor.tests.framework.CompareHelper;
-
+import org.castor.xmlctf.CastorTestable;
+import org.castor.xmlctf.RandomHelper;
+import org.castor.xmlctf.CompareHelper;
 
 public class X implements CastorTestable {
 
-    private int _id;
+    private int     _id;
     private String _content;
 
-    //--
     public void setId(int id) {
         _id = id;
     }
@@ -62,7 +59,6 @@
         return _id;
     }
 
-    //--
     public void setContent(String content) {
         _content = content;
     }
@@ -71,12 +67,12 @@
         return _content;
     }
 
-
     // --- CastorTestable ------------------------
+
     public boolean equals(Object object) {
-
-        if ( ! (object instanceof X))
+        if ( ! (object instanceof X)) {
             return false;
+        }
 
         X x = (X)object;
 
@@ -82,7 +78,7 @@
 
         if (this.getId() != x.getId()) return false;
         if (!CompareHelper.equals(this.getContent(), x.getContent())) return false;
-    
+
         return true;
     }
 
@@ -87,18 +83,12 @@
     }
 
     public String dumpFields() {
-        String dump = new String();
-
-        dump += "[Id=" + getId() + "]\n";
-        dump += "[Content=" + ((getContent() == null)? "null" : getContent()) + "]\n";
- 
-        return dump;
+        return "[Id=" + getId() + "]\n" +
+               "[Content=" + ((getContent() == null)? "null" : getContent()) + "]\n";
     }
 
-    public void randomizeFields()
-        throws InstantiationException, IllegalAccessException {
-
+    public void randomizeFields() throws InstantiationException, IllegalAccessException {
         // Not Implemented
+    }
 
-    }
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/XandZ.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/XandZ.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/container/XandZ.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -39,24 +39,20 @@
  * OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * Copyright 1999 (C) Intalio, Inc. All Rights Reserved.
- *
  */
 
-
-import org.exolab.castor.tests.framework.CastorTestable;
-import org.exolab.castor.tests.framework.RandomHelper;
-import org.exolab.castor.tests.framework.CompareHelper;
-
+import org.castor.xmlctf.CastorTestable;
+import org.castor.xmlctf.RandomHelper;
+import org.castor.xmlctf.CompareHelper;
 
 public class XandZ implements CastorTestable {
 
-    private X _x;
-    private X _z;
+    private X      _x;
+    private X      _z;
     private String _w;
-    private int _y;
-    private RandS _rs;
+    private int    _y;
+    private RandS  _rs;
 
-    //--
     public void setRandS(RandS rs) {
         _rs = rs;
     }
@@ -65,7 +61,6 @@
         return _rs;
     }
 
-    //--
     public void setX(X x) {
         _x = x;
     }
@@ -74,7 +69,6 @@
         return _x;
     }
 
-    //--
     public void setZ(X z) {
         _z = z;
     }
@@ -83,7 +77,6 @@
         return _z;
     }
 
-    //--
     public void setY(int y) {
         _y = y;
     }
@@ -92,7 +85,6 @@
         return _y;
     }
 
-    //--
     public void setW(String w) {
         _w = w;
     }
@@ -102,10 +94,11 @@
     }
 
     // --- CastorTestable ------------------------
+
     public boolean equals(Object object) {
-
-        if ( ! (object instanceof XandZ))
+        if ( ! (object instanceof XandZ)) {
             return false;
+        }
 
         XandZ xz = (XandZ)object;
 
@@ -114,7 +107,7 @@
         if (!CompareHelper.equals(this.getZ(), xz.getZ())) return false;
         if (this.getY() != xz.getY()) return false;
         if (!CompareHelper.equals(this.getW(), xz.getW())) return false;
-    
+
         return true;
     }
 
@@ -119,21 +112,15 @@
     }
 
     public String dumpFields() {
-        String dump = new String();
-
-        dump += "[RandS=" + ((getRandS() == null)? "null" : ((CastorTestable)getRandS()).dumpFields()) + "]\n";
-        dump += "[X=" + ((getX() == null)? "null" : ((CastorTestable)getX()).dumpFields()) + "]\n";
-        dump += "[Z=" + ((getZ() == null)? "null" : ((CastorTestable)getZ()).dumpFields()) + "]\n";
-        dump += "[Y=" + getY() + "]\n";
-        dump += "[W=" + ((getW() == null)? "null" : getW()) + "]\n";
-
-        return dump;
+        return  "[RandS=" + ((getRandS() == null)? "null" : ((CastorTestable)getRandS()).dumpFields()) + "]\n" +
+                "[X=" + ((getX() == null)? "null" : ((CastorTestable)getX()).dumpFields()) + "]\n" +
+                "[Z=" + ((getZ() == null)? "null" : ((CastorTestable)getZ()).dumpFields()) + "]\n" +
+                "[Y=" + getY() + "]\n" +
+                "[W=" + ((getW() == null)? "null" : getW()) + "]\n";
     }
 
-    public void randomizeFields()
-        throws InstantiationException, IllegalAccessException {
-
+    public void randomizeFields() throws InstantiationException, IllegalAccessException {
         // Not Implemented
+    }
 
-    }
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/enums/DocumentBuilder.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/enums/DocumentBuilder.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/enums/DocumentBuilder.java	(working copy)
@@ -1,4 +1,4 @@
-import org.exolab.castor.tests.framework.ObjectModelBuilder;
+import org.castor.xmlctf.ObjectModelBuilder;
 
 public class DocumentBuilder implements ObjectModelBuilder {
 
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/enums/DocumentWithHandlerBuilder.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/enums/DocumentWithHandlerBuilder.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/enums/DocumentWithHandlerBuilder.java	(working copy)
@@ -1,4 +1,4 @@
-import org.exolab.castor.tests.framework.ObjectModelBuilder;
+import org.castor.xmlctf.ObjectModelBuilder;
 
 public class DocumentWithHandlerBuilder implements ObjectModelBuilder {
 
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Get-Method/Get_Builder.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Get-Method/Get_Builder.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Get-Method/Get_Builder.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -39,15 +39,11 @@
  * OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * Copyright 1999 (C) Intalio, Inc. All Rights Reserved.
- *
  */
-
-import org.exolab.castor.tests.framework.ObjectModelBuilder;
+import org.castor.xmlctf.ObjectModelBuilder;
 
 public class Get_Builder implements ObjectModelBuilder {
 
-    public Get_Builder() {}
-
     /**
      * Build the object we expect when we unmarshal 'input.xml'
      */
@@ -52,11 +48,8 @@
      * Build the object we expect when we unmarshal 'input.xml'
      */
     public Object buildInstance() {
-        
         Get_Root r = new Get_Root("This is a name", 314159);
-
         return r;
-
     }
 
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/identities/identity-references/NodeBuilder.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/identities/identity-references/NodeBuilder.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/identities/identity-references/NodeBuilder.java	(working copy)
@@ -1,6 +1,6 @@
 import java.util.List;
 import java.util.ArrayList;
-import org.exolab.castor.tests.framework.ObjectModelBuilder;
+import org.castor.xmlctf.ObjectModelBuilder;
 
 public class NodeBuilder implements ObjectModelBuilder {
 
@@ -5,12 +5,11 @@
 public class NodeBuilder implements ObjectModelBuilder {
 
     /**
-     * Build the object we expect when we unmarshal 'input.xml'
+     * Build the object we expect when we unmarshal 'input.xml'.
      */
     public Object buildInstance() {
-    
-    	NodeList nodeList = new NodeList();
-    
+        NodeList nodeList = new NodeList();
+
         Node nodeOne = new Node();
         nodeOne.setNodeNum(1);
 
@@ -19,26 +18,27 @@
 
         Node nodeThree = new Node();
         nodeThree.setNodeNum(3);
-        
+
         List siblings = new ArrayList();
-		siblings.add(nodeTwo);
-		siblings.add(nodeThree); 
+        siblings.add(nodeTwo);
+        siblings.add(nodeThree);
         nodeOne.setSiblings(siblings);
 
         siblings = new ArrayList();
-		siblings.add(nodeOne);
-		siblings.add(nodeThree); 
+        siblings.add(nodeOne);
+        siblings.add(nodeThree);
         nodeTwo.setSiblings(siblings);
 
         siblings = new ArrayList();
-		siblings.add(nodeOne);
-		siblings.add(nodeTwo); 
+        siblings.add(nodeOne);
+        siblings.add(nodeTwo);
         nodeThree.setSiblings(siblings);
-        
+
         nodeList.addNode(nodeOne);
         nodeList.addNode(nodeTwo);
         nodeList.addNode(nodeThree);
-        
+
         return nodeList;
     }
+
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Include/A.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Include/A.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Include/A.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -42,11 +42,9 @@
  *
  */
 
-
-import org.exolab.castor.tests.framework.CastorTestable;
-import org.exolab.castor.tests.framework.RandomHelper;
-import org.exolab.castor.tests.framework.CompareHelper;
-
+import org.castor.xmlctf.CastorTestable;
+import org.castor.xmlctf.RandomHelper;
+import org.castor.xmlctf.CompareHelper;
 
 public class A implements CastorTestable {
 
@@ -51,9 +49,8 @@
 public class A implements CastorTestable {
 
     private int _number;
-    private B _b;
+    private B   _b;
 
-    //--
     public void setNumber(int i) {
         _number = i;
     }
@@ -62,7 +59,6 @@
         return _number;
     }
 
-    //--
     public void setBelement(B b) {
         _b = b;
     }
@@ -71,12 +67,12 @@
         return _b;
     }
 
-
     // --- CastorTestable ------------------------
+
     public boolean equals(Object object) {
-
-        if ( ! (object instanceof A))
+        if ( ! (object instanceof A)) {
             return false;
+        }
 
         A a = (A)object;
         if (!_b.equals(a.getBelement())) return false;
@@ -83,20 +79,13 @@
         if ( _number != a.getNumber() ) return false;
         return true;
     }
-    
+
     public String dumpFields() {
-        String dump = new String();
-
-        dump += "[Number=" + _number + "]\n";
-        dump += _b.dumpFields();
-        
-        return dump;
+        return "[Number=" + _number + "]\n" + _b.dumpFields();
     }
 
-    public void randomizeFields()
-        throws InstantiationException, IllegalAccessException {
-
+    public void randomizeFields() throws InstantiationException, IllegalAccessException {
         // Not Implemented
+    }
 
-    }
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Include/B.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Include/B.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Include/B.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -42,14 +42,12 @@
  *
  */
 
+import org.castor.xmlctf.CastorTestable;
+import org.castor.xmlctf.RandomHelper;
+import org.castor.xmlctf.CompareHelper;
 
-import org.exolab.castor.tests.framework.CastorTestable;
-import org.exolab.castor.tests.framework.RandomHelper;
-import org.exolab.castor.tests.framework.CompareHelper;
-
+public class B {
 
-public class B {
-    
     private String _name;
     private C _c;
 
@@ -61,20 +59,21 @@
     public String getName() {
         return _name;
     }
-    
+
     public void setCelement(C c) {
         _c = c;
     }
-    
+
     public C getCelement() {
         return _c;
-    } 
+    }
 
     // --- CastorTestable ------------------------
+
     public boolean equals(Object object) {
-
-        if ( ! (object instanceof B))
+        if ( ! (object instanceof B)) {
             return false;
+        }
 
         B b = (B)object;
         if (!_name.equals(b.getName())) return false;
@@ -80,21 +79,14 @@
         if (!_name.equals(b.getName())) return false;
         if (!_c.equals(b.getCelement())) return false;
         return true;
-    
     }
-    
-    public String dumpFields() {
-        String dump = new String();
 
-        dump += "[Name=" + _name + "]\n";
-        dump += _c.dumpFields();
-        return dump;
+    public String dumpFields() {
+        return "[Name=" + _name + "]\n" + _c.dumpFields();
     }
 
-    public void randomizeFields()
-        throws InstantiationException, IllegalAccessException {
-
+    public void randomizeFields() throws InstantiationException, IllegalAccessException {
         // Not Implemented
-
     }
+
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Include/Builder.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Include/Builder.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Include/Builder.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -42,17 +42,14 @@
  *
  */
 
-import org.exolab.castor.tests.framework.ObjectModelBuilder;
+import org.castor.xmlctf.ObjectModelBuilder;
 
 public class Builder implements ObjectModelBuilder {
 
-    public Builder() {}
-
     /**
-     * Build the object we expect when we unmarshal 'input.xml'
+     * Build the object we expect when we unmarshal 'input.xml'.
      */
     public Object buildInstance() {
-        
         A a = new A();
         B b = new B();
         C c = new C();
@@ -60,7 +57,8 @@
         b.setName("Castor");
         b.setCelement(c);
         a.setNumber(1213);
-        a.setBelement(b); 
+        a.setBelement(b);
         return a;
     }
+
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Include/C.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Include/C.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Include/C.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -42,17 +42,14 @@
  *
  */
 
-
-import org.exolab.castor.tests.framework.CastorTestable;
-import org.exolab.castor.tests.framework.RandomHelper;
-import org.exolab.castor.tests.framework.CompareHelper;
-
+import org.castor.xmlctf.CastorTestable;
+import org.castor.xmlctf.RandomHelper;
+import org.castor.xmlctf.CompareHelper;
 
 public class C {
-    
+
     private double _price;
 
-    //--
     public void setPrice(double price) {
         _price = price;
     }
@@ -62,10 +59,11 @@
     }
 
     // --- CastorTestable ------------------------
+
     public boolean equals(Object object) {
-
-        if ( ! (object instanceof C))
+        if ( ! (object instanceof C)) {
             return false;
+        }
 
         C c = (C)object;
         if (_price != c.getPrice()) return false;
@@ -70,21 +68,14 @@
         C c = (C)object;
         if (_price != c.getPrice()) return false;
         return true;
-    
     }
-    
+
     public String dumpFields() {
-        String dump = new String();
-
-        dump += "[Price=" + _price + "]\n";
-        
-        return dump;
+        return "[Price=" + _price + "]\n";
     }
 
-    public void randomizeFields()
-        throws InstantiationException, IllegalAccessException {
-
+    public void randomizeFields() throws InstantiationException, IllegalAccessException {
         // Not Implemented
+    }
 
-    }
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Inheritance_Regression1/A_Builder.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Inheritance_Regression1/A_Builder.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/Inheritance_Regression1/A_Builder.java	(working copy)
@@ -42,12 +42,10 @@
  *
  */
 
-import org.exolab.castor.tests.framework.ObjectModelBuilder;
+import org.castor.xmlctf.ObjectModelBuilder;
 
 public class A_Builder implements ObjectModelBuilder {
 
-    public A_Builder() {}
-
     /**
      * Build the object we expect when we unmarshal 'input.xml'.
      */
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/listeners/BaseClass.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/listeners/BaseClass.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/listeners/BaseClass.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -42,7 +42,6 @@
  *
  */
 
-
 /**
  * Simple implementation of some fields with a corresponding
  * mapping file to marshal/unmarshal.
@@ -47,14 +46,12 @@
  * Simple implementation of some fields with a corresponding
  * mapping file to marshal/unmarshal.
  */
-public class BaseClass
-    implements org.exolab.castor.tests.framework.CastorTestable
-{
+public class BaseClass implements org.castor.xmlctf.CastorTestable {
 
-    private String _attribute = "";
-    private String _element;
+    private String      _attribute = "";
+    private String      _element;
     protected BaseClass _child;
-    private int _numMods = 0;
+    private int         _numMods   = 0;
 
     //--
     public void setElement (String element) {
@@ -90,8 +87,10 @@
         return _numMods;
     }
 
-    /* Testing depends on this, as the toString representation
-       of an object is used for logging the objects in the Listeners*/
+    /**
+     * Testing depends on this, as the toString representation of an object is
+     * used for logging the objects in the Listeners
+     */
     public String toString () {
         return _attribute;
     }
@@ -98,33 +97,35 @@
 
 
     // --- CastorTestable ------------------------
+
     public boolean equals(Object object) {
+        if (object == null) {
+            return false;
+        }
 
-        if (object == null)
+        if ( ! (object instanceof BaseClass)) {
             return false;
-            
-        if ( ! (object instanceof BaseClass))
-            return false;
+        }
 
         BaseClass a = (BaseClass)object;
-        
+
         if (_child != null) {
-        	 if (a.getChild() == null)
-        	     return false;
-             else if (!_child.equals(a.getChild())) 
+             if (a.getChild() == null)
+                 return false;
+             else if (!_child.equals(a.getChild()))
                  return false;
         }
         if (_element != null) {
-        	if (a.getElement() == null)
-        	    return false;
-        	else if ( !_element.equals(a.getElement()) ) 
-        	     return false;
+            if (a.getElement() == null)
+                return false;
+            else if ( !_element.equals(a.getElement()) )
+                 return false;
         }
         if (_attribute != null) {
-        	if (a.getAttribute() == null)   
-        	    return false;
-        	else if ( !_attribute.equals(a.getAttribute()) ) 
-        	    return false;
+            if (a.getAttribute() == null)
+                return false;
+            else if ( !_attribute.equals(a.getAttribute()) )
+                return false;
         }
         return true;
     }
@@ -147,10 +148,8 @@
         return dump.toString();
     }
 
-    public void randomizeFields()
-        throws InstantiationException, IllegalAccessException {
-
+    public void randomizeFields() throws InstantiationException, IllegalAccessException {
         // Not Implemented
-
     }
+
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/listeners/SimpleListener.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/listeners/SimpleListener.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/listeners/SimpleListener.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -46,7 +46,7 @@
 
 import org.exolab.castor.xml.MarshalListener;
 import org.exolab.castor.xml.UnmarshalListener;
-import org.exolab.castor.tests.framework.CastorTestable;
+import org.castor.xmlctf.CastorTestable;
 
 import java.util.Vector;
 
@@ -55,8 +55,7 @@
  * that does nothing to the elements being marshaled/unmarshalled.
  * It merely stores them on a list for later reporting.
  */
-public class SimpleListener
-    implements MarshalListener, UnmarshalListener, CastorTestable {
+public class SimpleListener implements MarshalListener, UnmarshalListener, CastorTestable {
 
     private Vector _calls;
 
@@ -82,7 +81,6 @@
         log(msg);
     }
 
-
     /** MarshalListener */
     public boolean preMarshal (Object o) {
         log(o, "PreMarshal");
@@ -108,7 +106,7 @@
     public void unmarshalled (Object o) {
         log(o, "Unmarshalled");
     }
-    
+
     /** UnmarshalListener */
     public void attributesProcessed(Object o) {
         log(o, "Attributes Processed");
@@ -113,7 +111,6 @@
     public void attributesProcessed(Object o) {
         log(o, "Attributes Processed");
     }
-    
 
     /** mapping.xml */
     public Vector getCalls () {
@@ -142,9 +139,8 @@
         StringBuffer buf = new StringBuffer();
         buf.append("<" + getClass().getName() + ">");
         for (int i=0;i<_calls.size(); i++) {
-            buf.append(
-                "<call number=\"" + (i+1) + "\">" +
-                _calls.get(i).toString() + "</call>");
+            buf.append("<call number=\"" + (i+1) + "\">" +
+                       _calls.get(i).toString() + "</call>");
         }
         buf.append("</" + getClass().getName() + "/>");
         return buf.toString();
@@ -151,12 +147,8 @@
     }
 
     /** CastorTestable */
-    public void randomizeFields()
-        throws InstantiationException, IllegalAccessException {
-
+    public void randomizeFields() throws InstantiationException, IllegalAccessException {
         // Not Implemented
-
     }
 
 }
-
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/QNameSupport/QName_Builder.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/QNameSupport/QName_Builder.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/QNameSupport/QName_Builder.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -42,20 +42,17 @@
  *
  */
 
-import org.exolab.castor.tests.framework.ObjectModelBuilder;
+import org.castor.xmlctf.ObjectModelBuilder;
 
 public class QName_Builder implements ObjectModelBuilder {
 
-   
     /**
-     * Build the object we expect when we unmarshal 'input.xml'
+     * Build the object we expect when we unmarshal 'input.xml'.
      */
     public Object buildInstance() {
-        
         QName_Root r = new QName_Root("{http://www.castor.org/Mapping/QName}a name","{http://blank.namespace.com}black");
         r.setItem("{http://www.fooshop.com/Items}ball");
         return r;
-
     }
 
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/QNameSupport/QName_Root.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/QNameSupport/QName_Root.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/QNameSupport/QName_Root.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -42,8 +42,7 @@
  *
  */
 
-
-public class QName_Root implements org.exolab.castor.tests.framework.CastorTestable {
+public class QName_Root implements org.castor.xmlctf.CastorTestable {
 
     private String _name  = "{http://www.castor.org/Mapping/QName}default value";
     private String _item = "{http://www.fooshop.com/Items}penguins";
@@ -49,10 +48,10 @@
     private String _item = "{http://www.fooshop.com/Items}penguins";
     private String _value = "{http://blank.namespace.com}blank";
 
-    //--
-    public QName_Root() {}
+    public QName_Root() {
+        // Default constructor
+    }
 
-    //--
     public QName_Root(String name, String value) {
         _name  = name;
         _value = value;
@@ -58,7 +57,6 @@
         _value = value;
     }
 
-    //--
     public String getItem() {
         return _item;
     }
@@ -68,7 +66,6 @@
         _item = item;
     }
 
-    //--
     public String getName() {
         return _name;
     }
@@ -77,34 +74,33 @@
         _name = name;
     }
 
-    //--
     public String getValue() {
         return _value;
     }
-    
+
     public void setValue(String value) {
        _value = value;
     }
-    
+
     //Castor Testable
+
     public String dumpFields() {
-    	String result = "";
-    	result += "\nField name:"+_name;
-    	result += "\nField item:"+_item;
-    	result += "\nField value:"+_value;
-    	return result;
+        return "\nField name:" + _name + "\nField item:" + _item + "\nField value:" + _value;
     }
-    public void randomizeFields()
-         throws InstantiationException, IllegalAccessException     
-    {}
-    
+
+    public void randomizeFields() throws InstantiationException, IllegalAccessException {
+        // Not implemented
+    }
+
     public boolean equals(Object obj) {
-       if (!(obj instanceof QName_Root))
+       if (!(obj instanceof QName_Root)) {
            return false;
+       }
+
        QName_Root temp = (QName_Root)obj;
-       return (temp.getName().equals(this.getName())) && 
-              (temp.getItem().equals(this.getItem())) && 
-              (temp.getValue().equals(this.getValue())); 
+       return (temp.getName().equals(this.getName())) &&
+              (temp.getItem().equals(this.getItem())) &&
+              (temp.getValue().equals(this.getValue()));
     }
 
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/required/Required_Builder.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/required/Required_Builder.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/mapping/required/Required_Builder.java	(working copy)
@@ -1,4 +1,4 @@
-/**
+/*
  * Redistribution and use of this software and associated documentation
  * ("Software"), with or without modification, are permitted provided
  * that the following conditions are met:
@@ -42,12 +42,10 @@
  *
  */
 
-import org.exolab.castor.tests.framework.ObjectModelBuilder;
+import org.castor.xmlctf.ObjectModelBuilder;
 
 public class Required_Builder implements ObjectModelBuilder {
 
-    public Required_Builder() {}
-
     /**
      * Build the object we expect when we unmarshal 'input.xml'
      */
@@ -52,13 +50,10 @@
      * Build the object we expect when we unmarshal 'input.xml'
      */
     public Object buildInstance() {
-        
         Required_Root r = new Required_Root();
         r.setName("castor");
         r.setItem("beaver");
-
         return r;
-
     }
 
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/sourcegenerator/generationOnly/infiniteLoop/TestDescriptor.xml
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/sourcegenerator/generationOnly/infiniteLoop/TestDescriptor.xml	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/sourcegenerator/generationOnly/infiniteLoop/TestDescriptor.xml	(working copy)
@@ -9,7 +9,7 @@
         <Schema>test.xsd</Schema>
         <UnitTestCase>
             <Name>Test Source Generation</Name>
-            <Failure exception="org.exolab.castor.tests.framework.CompilationException"
+            <Failure exception="org.castor.xmlctf.CompilationException"
                      FailureStep="source-compilation">true</Failure>
         </UnitTestCase>
      </OnlySourceGenerationTest>
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/sourcegenerator/generationOnly/NameCollisions/javaLang/element/TestDescriptor.xml
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/sourcegenerator/generationOnly/NameCollisions/javaLang/element/TestDescriptor.xml	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/sourcegenerator/generationOnly/NameCollisions/javaLang/element/TestDescriptor.xml	(working copy)
@@ -11,7 +11,7 @@
         <UnitTestCase>
             <Name>Test Source Generation</Name>
             <!-- No source is generated for this test right now, so there's nothing to fail -->
-            <Failure exception="org.exolab.castor.tests.framework.CompilationException"
+            <Failure exception="org.castor.xmlctf.CompilationException"
                      FailureStep="source-compilation">true</Failure>
         </UnitTestCase>
      </OnlySourceGenerationTest>
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/sourcegenerator/generationOnly/NameCollisions/javaLang/simpleType/TestDescriptor.xml
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/sourcegenerator/generationOnly/NameCollisions/javaLang/simpleType/TestDescriptor.xml	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/sourcegenerator/generationOnly/NameCollisions/javaLang/simpleType/TestDescriptor.xml	(working copy)
@@ -11,7 +11,7 @@
         <UnitTestCase>
             <Name>Test Source Generation</Name>
             <!-- No source is generated for this test right now, so there's nothing to fail -->
-            <Failure exception="org.exolab.castor.tests.framework.CompilationException"
+            <Failure exception="org.castor.xmlctf.CompilationException"
                      FailureStep="source-compilation">true</Failure>
         </UnitTestCase>
      </OnlySourceGenerationTest>
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/sourcegenerator/IDREFS/IDREFSBuilder.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/sourcegenerator/IDREFS/IDREFSBuilder.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/sourcegenerator/IDREFS/IDREFSBuilder.java	(working copy)
@@ -1,18 +1,16 @@
 
 import java.util.Vector;
 
-import org.exolab.castor.tests.framework.ObjectModelBuilder;
+import org.castor.xmlctf.ObjectModelBuilder;
 
-public class IDREFSBuilder implements ObjectModelBuilder
-{
+public class IDREFSBuilder implements ObjectModelBuilder {
 
     /**
-     * Build the object expected when unmarshalling 'input1.xml'
+     * Build the object expected when unmarshalling 'input1.xml'.
      */
     public Object buildInstance() {
+        Root test = new Root();
 
-        Root test = new Root();
-        
         Element1 el1 = new Element1();
         el1.setId1("CASTOR");
         Element2 el2 = new Element2();
@@ -19,17 +17,14 @@
         el2.setId2("POLLUX");
         Element3 el3 = new Element3();
         el3.setId3("PROMETHEE");
-	  ElementRef elRef = new ElementRef();
-	  elRef.addIdref(el1);
+        ElementRef elRef = new ElementRef();
+        elRef.addIdref(el1);
         elRef.addIdref(el2);
-	  test.setElement1(el1);
+        test.setElement1(el1);
         test.setElement2(el2);
         test.setElement3(el3);
-        test.setElementRef(elRef); 
+        test.setElementRef(elRef);
         return test;
-
     }
 
 }
-
-
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/sourcegenerator/Primitives/WithoutFacetsTest/PrimitivesBuilder.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/sourcegenerator/Primitives/WithoutFacetsTest/PrimitivesBuilder.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/sourcegenerator/Primitives/WithoutFacetsTest/PrimitivesBuilder.java	(working copy)
@@ -1,7 +1,7 @@
 
 import java.util.Vector;
 
-import org.exolab.castor.tests.framework.ObjectModelBuilder;
+import org.castor.xmlctf.ObjectModelBuilder;
 
 public class PrimitivesBuilder implements ObjectModelBuilder {
 
@@ -58,4 +58,5 @@
 
         return test;
     }
+
 }
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/sourcegenerator/Primitives/WithWrappers/PrimitivesBuilder.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/sourcegenerator/Primitives/WithWrappers/PrimitivesBuilder.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/MasterTestSuite/sourcegenerator/Primitives/WithWrappers/PrimitivesBuilder.java	(working copy)
@@ -1,50 +1,31 @@
 
 import java.util.Vector;
 
-import org.exolab.castor.tests.framework.ObjectModelBuilder;
+import org.castor.xmlctf.ObjectModelBuilder;
 
-public class PrimitivesBuilder implements ObjectModelBuilder
-{
+public class PrimitivesBuilder implements ObjectModelBuilder {
 
     /**
-     * Build the object expected when unmarshalling 'input1.xml'
+     * Build the object expected when unmarshalling 'input1.xml'.
      */
     public Object buildInstance() {
-
         TestPrimitiveToWrapper test = new TestPrimitiveToWrapper();
-
         test.setBooleanTestAtt(new Boolean(false));
-
         test.setFloatTestAtt(new Float(3.141526f));
-
         test.setDoubleTestAtt(new Double(1.171077));
-
         test.setIntTestAtt(new Integer(23));
-
         test.setIntegerTestAtt(new Long(12));
-
         test.setLongTestAtt(new Long(23121311L));
-
         test.setShortTestAtt(new Short((short)2));
-
         test.setBooleanTest(new Boolean(true));
-
         test.setFloatTest(new Float(123456.78f));
-
         test.setDoubleTest(new Double(0.6385682166079459));
-
         test.setIntTest(new Integer(12));
-
         test.addIntegerTest(new Long(325325));
-
         test.setLongTest(new Long(98998989898L));
-
         test.setShortTest(new Short((short)34));
 
         return test;
-
     }
 
 }
-
-
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/RegressionTestSuite/sourcegenerator/NMTOKENS/NMTOKENS_Builder.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/RegressionTestSuite/sourcegenerator/NMTOKENS/NMTOKENS_Builder.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/RegressionTestSuite/sourcegenerator/NMTOKENS/NMTOKENS_Builder.java	(working copy)
@@ -1,32 +1,21 @@
 
 import java.util.Vector;
 
-import org.exolab.castor.tests.framework.ObjectModelBuilder;
+import org.castor.xmlctf.ObjectModelBuilder;
 
-public class NMTOKENS_Builder implements ObjectModelBuilder
-{
+public class NMTOKENS_Builder implements ObjectModelBuilder {
 
     /**
-     * Build the object expected when unmarshalling 'input1.xml'
+     * Build the object expected when unmarshalling 'input1.xml'.
      */
     public Object buildInstance() {
-
         Test_NMTOKENS test = new Test_NMTOKENS();
-
         test.addBar("nm1");
-        
         test.addBar("nm2");
-        
         test.addBar("nm3");
-        
         test.addFoo("NMTOKEN1");
-        
         test.addFoo("NMTOKEN2");
-
         return test;
-
     }
 
 }
-
-
Index: /home/ekuns/workspace/castor-4/xmlctf/tests/RegressionTestSuite/sourcegenerator/Restriction/Restriction_Builder.java
===================================================================
--- /home/ekuns/workspace/castor-4/xmlctf/tests/RegressionTestSuite/sourcegenerator/Restriction/Restriction_Builder.java	(revision 6781)
+++ /home/ekuns/workspace/castor-4/xmlctf/tests/RegressionTestSuite/sourcegenerator/Restriction/Restriction_Builder.java	(working copy)
@@ -1,26 +1,18 @@
 
 import java.util.Vector;
 
-import org.exolab.castor.tests.framework.ObjectModelBuilder;
+import org.castor.xmlctf.ObjectModelBuilder;
 
-public class Restriction_Builder implements ObjectModelBuilder
-{
+public class Restriction_Builder implements ObjectModelBuilder {
 
     /**
-     * Build the object expected when unmarshalling 'input1.xml'
+     * Build the object expected when unmarshalling 'input1.xml'.
      */
     public Object buildInstance() {
-
         MyDerivedElement test = new MyDerivedElement();
-
         test.addOtherElement(true);
-        
         test.addOtherElement(false);
-
         return test;
-
     }
 
 }
-
-

