Author: vyemialyanchyk
Date: 2010-09-06 09:39:19 -0400 (Mon, 06 Sep 2010)
New Revision: 24735
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenInternalProps_test1.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenInternalProps_test2.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenJpa_test1.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenJpa_test2.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenNullable_test1.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenNullable_test2.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenProps.hibernate.properties
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenProps_test1.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenProps_test2.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenReveng_test1.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenReveng_test2.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGen_test1.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGen_test2.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/CodeGenXMLFactoryTest.java
Log:
https://jira.jboss.org/browse/JBIDE-6838 - fixed
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenInternalProps_test1.xml
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenInternalProps_test1.xml 2010-09-06
12:00:03 UTC (rev 24734)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenInternalProps_test1.xml 2010-09-06
13:39:19 UTC (rev 24735)
@@ -1,44 +1,44 @@
-<project name="CodeGen" default="hibernateAntCodeGeneration">
- <property name="build.dir" location="reslocation/test"/>
- <property name="hibernatePropFile"
value="${java.io.tmpdir}${ant.project.name}-hibernate.properties"/>
- <target name="generateHibernatePropeties">
- <echo
file="${hibernatePropFile}">hibernate.connection.driver_class=driverClass
-hibernate.connection.password=passw
-hibernate.connection.url=url
-hibernate.connection.username=username
-hibernate.dialect=testDialect</echo>
- </target>
- <path id="toolslib"/>
- <target name="hibernateAntCodeGeneration"
depends="generateHibernatePropeties">
- <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
- <hibernatetool destdir="${build.dir}">
- <configuration configurationFile="project/src/hibernate.cfg.xml"
propertyFile="${hibernatePropFile}"/>
- <classpath>
- <path location="${build.dir}"/>
- </classpath>
- <hbm2doc>
- <property key="ejb3" value="false"/>
- <property key="jdk5" value="false"/>
- </hbm2doc>
- <hbm2cfgxml>
- <property key="jdk5" value="false"/>
- </hbm2cfgxml>
- <hbm2hbmxml>
- <property key="ejb3" value="false"/>
- <property key="jdk5" value="false"/>
- </hbm2hbmxml>
- <hbmtemplate>
- <property key="ejb3" value="false"/>
- <property key="jdk5" value="false"/>
- </hbmtemplate>
- <hbm2java destdir="outputdir/test">
- <property key="keyXXX" value="valueYYY"/>
- </hbm2java>
- <hbm2ddl export="false">
- <property key="ejb3" value="false"/>
- <property key="jdk5" value="false"/>
- </hbm2ddl>
- <hbm2dao/>
- </hibernatetool>
- </target>
+<project name="CodeGen" default="hibernateAntCodeGeneration">
+ <property name="build.dir" location="reslocation/test"/>
+ <property name="hibernatePropFile"
value="${java.io.tmpdir}${ant.project.name}-hibernate.properties"/>
+ <target name="generateHibernatePropeties">
+ <echo
file="${hibernatePropFile}">hibernate.connection.driver_class=driverClass
+hibernate.connection.password=passw
+hibernate.connection.url=url
+hibernate.connection.username=username
+hibernate.dialect=testDialect</echo>
+ </target>
+ <path id="toolslib"/>
+ <target name="hibernateAntCodeGeneration"
depends="generateHibernatePropeties">
+ <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
+ <hibernatetool destdir="${build.dir}">
+ <configuration configurationFile="project/src/hibernate.cfg.xml"
propertyFile="${hibernatePropFile}"/>
+ <classpath>
+ <path location="${build.dir}"/>
+ </classpath>
+ <hbm2doc>
+ <property key="ejb3" value="false"/>
+ <property key="jdk5" value="false"/>
+ </hbm2doc>
+ <hbm2cfgxml>
+ <property key="jdk5" value="false"/>
+ </hbm2cfgxml>
+ <hbm2hbmxml>
+ <property key="ejb3" value="false"/>
+ <property key="jdk5" value="false"/>
+ </hbm2hbmxml>
+ <hbmtemplate>
+ <property key="ejb3" value="false"/>
+ <property key="jdk5" value="false"/>
+ </hbmtemplate>
+ <hbm2java destdir="outputdir/test">
+ <property key="keyXXX" value="valueYYY"/>
+ </hbm2java>
+ <hbm2ddl export="false">
+ <property key="ejb3" value="false"/>
+ <property key="jdk5" value="false"/>
+ </hbm2ddl>
+ <hbm2dao/>
+ </hibernatetool>
+ </target>
</project>
\ No newline at end of file
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenInternalProps_test2.xml
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenInternalProps_test2.xml 2010-09-06
12:00:03 UTC (rev 24734)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenInternalProps_test2.xml 2010-09-06
13:39:19 UTC (rev 24735)
@@ -1,24 +1,24 @@
-<project name="CodeGen" default="hibernateAntCodeGeneration">
- <property name="build.dir" location="reslocation/test"/>
- <property name="hibernatePropFile"
value="${java.io.tmpdir}${ant.project.name}-hibernate.properties"/>
- <target name="generateHibernatePropeties">
- <echo
file="${hibernatePropFile}">hibernate.connection.driver_class=driverClass
-hibernate.connection.password=passw
-hibernate.connection.url=url
-hibernate.connection.username=username
-hibernate.dialect=testDialect</echo>
- </target>
- <path id="toolslib"/>
- <target name="hibernateAntCodeGeneration"
depends="generateHibernatePropeties">
- <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
- <hibernatetool destdir="${build.dir}">
- <configuration configurationFile="project/src/hibernate.cfg.xml"
propertyFile="${hibernatePropFile}"/>
- <classpath>
- <path location="${build.dir}"/>
- </classpath>
- <hbm2java destdir="outputdir/test">
- <property key="keyXXX" value="valueYYY"/>
- </hbm2java>
- </hibernatetool>
- </target>
+<project name="CodeGen" default="hibernateAntCodeGeneration">
+ <property name="build.dir" location="reslocation/test"/>
+ <property name="hibernatePropFile"
value="${java.io.tmpdir}${ant.project.name}-hibernate.properties"/>
+ <target name="generateHibernatePropeties">
+ <echo
file="${hibernatePropFile}">hibernate.connection.driver_class=driverClass
+hibernate.connection.password=passw
+hibernate.connection.url=url
+hibernate.connection.username=username
+hibernate.dialect=testDialect</echo>
+ </target>
+ <path id="toolslib"/>
+ <target name="hibernateAntCodeGeneration"
depends="generateHibernatePropeties">
+ <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
+ <hibernatetool destdir="${build.dir}">
+ <configuration configurationFile="project/src/hibernate.cfg.xml"
propertyFile="${hibernatePropFile}"/>
+ <classpath>
+ <path location="${build.dir}"/>
+ </classpath>
+ <hbm2java destdir="outputdir/test">
+ <property key="keyXXX" value="valueYYY"/>
+ </hbm2java>
+ </hibernatetool>
+ </target>
</project>
\ No newline at end of file
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenJpa_test1.xml
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenJpa_test1.xml 2010-09-06
12:00:03 UTC (rev 24734)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenJpa_test1.xml 2010-09-06
13:39:19 UTC (rev 24735)
@@ -1,45 +1,45 @@
-<project name="CodeGen" default="hibernateAntCodeGeneration">
- <property name="build.dir" location="reslocation/test"/>
- <path id="toolslib">
- <path location="ejb3-persistence.jar"/>
- <path location="hibernate3.jar"/>
- <path location="hsqldb.jar"/>
- </path>
- <target name="hibernateAntCodeGeneration">
- <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
- <hibernatetool destdir="${build.dir}">
- <jpaconfiguration namingStrategy="testNamingStrategy"
persistenceUnit="testPersistenceUnit">
- <fileset dir="." id="id">
- <include name="xxx.hbm.xml"/>
- <include name="yyy.hbm.xml"/>
- </fileset>
- </jpaconfiguration>
- <classpath>
- <path location="${build.dir}"/>
- </classpath>
- <hbm2doc>
- <property key="ejb3" value="true"/>
- <property key="jdk5" value="true"/>
- </hbm2doc>
- <hbm2cfgxml ejb3="true">
- <property key="jdk5" value="true"/>
- </hbm2cfgxml>
- <hbm2hbmxml>
- <property key="ejb3" value="true"/>
- <property key="jdk5" value="true"/>
- </hbm2hbmxml>
- <hbmtemplate>
- <property key="ejb3" value="true"/>
- <property key="jdk5" value="true"/>
- </hbmtemplate>
- <hbm2java destdir="outputdir/test" ejb3="true"
jdk5="true">
- <property key="keyXXX" value="valueYYY"/>
- </hbm2java>
- <hbm2ddl export="false">
- <property key="ejb3" value="true"/>
- <property key="jdk5" value="true"/>
- </hbm2ddl>
- <hbm2dao ejb3="true" jdk5="true"/>
- </hibernatetool>
- </target>
+<project name="CodeGen" default="hibernateAntCodeGeneration">
+ <property name="build.dir" location="reslocation/test"/>
+ <path id="toolslib">
+ <path location="ejb3-persistence.jar"/>
+ <path location="hibernate3.jar"/>
+ <path location="hsqldb.jar"/>
+ </path>
+ <target name="hibernateAntCodeGeneration">
+ <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
+ <hibernatetool destdir="${build.dir}">
+ <jpaconfiguration namingStrategy="testNamingStrategy"
persistenceUnit="testPersistenceUnit">
+ <fileset dir="." id="id">
+ <include name="xxx.hbm.xml"/>
+ <include name="yyy.hbm.xml"/>
+ </fileset>
+ </jpaconfiguration>
+ <classpath>
+ <path location="${build.dir}"/>
+ </classpath>
+ <hbm2doc>
+ <property key="ejb3" value="true"/>
+ <property key="jdk5" value="true"/>
+ </hbm2doc>
+ <hbm2cfgxml ejb3="true">
+ <property key="jdk5" value="true"/>
+ </hbm2cfgxml>
+ <hbm2hbmxml>
+ <property key="ejb3" value="true"/>
+ <property key="jdk5" value="true"/>
+ </hbm2hbmxml>
+ <hbmtemplate>
+ <property key="ejb3" value="true"/>
+ <property key="jdk5" value="true"/>
+ </hbmtemplate>
+ <hbm2java destdir="outputdir/test" ejb3="true"
jdk5="true">
+ <property key="keyXXX" value="valueYYY"/>
+ </hbm2java>
+ <hbm2ddl export="false">
+ <property key="ejb3" value="true"/>
+ <property key="jdk5" value="true"/>
+ </hbm2ddl>
+ <hbm2dao ejb3="true" jdk5="true"/>
+ </hibernatetool>
+ </target>
</project>
\ No newline at end of file
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenJpa_test2.xml
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenJpa_test2.xml 2010-09-06
12:00:03 UTC (rev 24734)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenJpa_test2.xml 2010-09-06
13:39:19 UTC (rev 24735)
@@ -1,25 +1,25 @@
-<project name="CodeGen" default="hibernateAntCodeGeneration">
- <property name="build.dir" location="reslocation/test"/>
- <path id="toolslib">
- <path location="ejb3-persistence.jar"/>
- <path location="hibernate3.jar"/>
- <path location="hsqldb.jar"/>
- </path>
- <target name="hibernateAntCodeGeneration">
- <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
- <hibernatetool destdir="${build.dir}">
- <jpaconfiguration namingStrategy="testNamingStrategy"
persistenceUnit="testPersistenceUnit">
- <fileset dir="." id="id">
- <include name="xxx.hbm.xml"/>
- <include name="yyy.hbm.xml"/>
- </fileset>
- </jpaconfiguration>
- <classpath>
- <path location="${build.dir}"/>
- </classpath>
- <hbm2java destdir="outputdir/test" ejb3="true"
jdk5="true">
- <property key="keyXXX" value="valueYYY"/>
- </hbm2java>
- </hibernatetool>
- </target>
+<project name="CodeGen" default="hibernateAntCodeGeneration">
+ <property name="build.dir" location="reslocation/test"/>
+ <path id="toolslib">
+ <path location="ejb3-persistence.jar"/>
+ <path location="hibernate3.jar"/>
+ <path location="hsqldb.jar"/>
+ </path>
+ <target name="hibernateAntCodeGeneration">
+ <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
+ <hibernatetool destdir="${build.dir}">
+ <jpaconfiguration namingStrategy="testNamingStrategy"
persistenceUnit="testPersistenceUnit">
+ <fileset dir="." id="id">
+ <include name="xxx.hbm.xml"/>
+ <include name="yyy.hbm.xml"/>
+ </fileset>
+ </jpaconfiguration>
+ <classpath>
+ <path location="${build.dir}"/>
+ </classpath>
+ <hbm2java destdir="outputdir/test" ejb3="true"
jdk5="true">
+ <property key="keyXXX" value="valueYYY"/>
+ </hbm2java>
+ </hibernatetool>
+ </target>
</project>
\ No newline at end of file
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenNullable_test1.xml
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenNullable_test1.xml 2010-09-06
12:00:03 UTC (rev 24734)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenNullable_test1.xml 2010-09-06
13:39:19 UTC (rev 24735)
@@ -1,35 +1,35 @@
-<project name="CodeGen" default="hibernateAntCodeGeneration">
- <property name="build.dir" location="reslocation/test"/>
- <path id="toolslib"/>
- <target name="hibernateAntCodeGeneration">
- <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
- <hibernatetool destdir="${build.dir}">
- <classpath>
- <path location="${build.dir}"/>
- </classpath>
- <hbm2doc>
- <property key="ejb3" value="false"/>
- <property key="jdk5" value="false"/>
- </hbm2doc>
- <hbm2cfgxml>
- <property key="jdk5" value="false"/>
- </hbm2cfgxml>
- <hbm2hbmxml>
- <property key="ejb3" value="false"/>
- <property key="jdk5" value="false"/>
- </hbm2hbmxml>
- <hbmtemplate>
- <property key="ejb3" value="false"/>
- <property key="jdk5" value="false"/>
- </hbmtemplate>
- <hbm2java destdir="outputdir/test">
- <property key="keyXXX" value="valueYYY"/>
- </hbm2java>
- <hbm2ddl export="false">
- <property key="ejb3" value="false"/>
- <property key="jdk5" value="false"/>
- </hbm2ddl>
- <hbm2dao/>
- </hibernatetool>
- </target>
+<project name="CodeGen" default="hibernateAntCodeGeneration">
+ <property name="build.dir" location="reslocation/test"/>
+ <path id="toolslib"/>
+ <target name="hibernateAntCodeGeneration">
+ <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
+ <hibernatetool destdir="${build.dir}">
+ <classpath>
+ <path location="${build.dir}"/>
+ </classpath>
+ <hbm2doc>
+ <property key="ejb3" value="false"/>
+ <property key="jdk5" value="false"/>
+ </hbm2doc>
+ <hbm2cfgxml>
+ <property key="jdk5" value="false"/>
+ </hbm2cfgxml>
+ <hbm2hbmxml>
+ <property key="ejb3" value="false"/>
+ <property key="jdk5" value="false"/>
+ </hbm2hbmxml>
+ <hbmtemplate>
+ <property key="ejb3" value="false"/>
+ <property key="jdk5" value="false"/>
+ </hbmtemplate>
+ <hbm2java destdir="outputdir/test">
+ <property key="keyXXX" value="valueYYY"/>
+ </hbm2java>
+ <hbm2ddl export="false">
+ <property key="ejb3" value="false"/>
+ <property key="jdk5" value="false"/>
+ </hbm2ddl>
+ <hbm2dao/>
+ </hibernatetool>
+ </target>
</project>
\ No newline at end of file
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenNullable_test2.xml
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenNullable_test2.xml 2010-09-06
12:00:03 UTC (rev 24734)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenNullable_test2.xml 2010-09-06
13:39:19 UTC (rev 24735)
@@ -1,15 +1,15 @@
-<project name="CodeGen" default="hibernateAntCodeGeneration">
- <property name="build.dir" location="reslocation/test"/>
- <path id="toolslib"/>
- <target name="hibernateAntCodeGeneration">
- <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
- <hibernatetool destdir="${build.dir}">
- <classpath>
- <path location="${build.dir}"/>
- </classpath>
- <hbm2java destdir="outputdir/test">
- <property key="keyXXX" value="valueYYY"/>
- </hbm2java>
- </hibernatetool>
- </target>
+<project name="CodeGen" default="hibernateAntCodeGeneration">
+ <property name="build.dir" location="reslocation/test"/>
+ <path id="toolslib"/>
+ <target name="hibernateAntCodeGeneration">
+ <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
+ <hibernatetool destdir="${build.dir}">
+ <classpath>
+ <path location="${build.dir}"/>
+ </classpath>
+ <hbm2java destdir="outputdir/test">
+ <property key="keyXXX" value="valueYYY"/>
+ </hbm2java>
+ </hibernatetool>
+ </target>
</project>
\ No newline at end of file
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenProps.hibernate.properties
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenProps.hibernate.properties 2010-09-06
12:00:03 UTC (rev 24734)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenProps.hibernate.properties 2010-09-06
13:39:19 UTC (rev 24735)
@@ -1,5 +1,5 @@
-hibernate.connection.driver_class=driverClass
-hibernate.connection.password=passw
-hibernate.connection.url=url
-hibernate.connection.username=username
+hibernate.connection.driver_class=driverClass
+hibernate.connection.password=passw
+hibernate.connection.url=url
+hibernate.connection.username=username
hibernate.dialect=testDialect
\ No newline at end of file
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenProps_test1.xml
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenProps_test1.xml 2010-09-06
12:00:03 UTC (rev 24734)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenProps_test1.xml 2010-09-06
13:39:19 UTC (rev 24735)
@@ -1,36 +1,36 @@
-<project name="CodeGen" default="hibernateAntCodeGeneration">
- <property name="build.dir" location="reslocation/test"/>
- <path id="toolslib"/>
- <target name="hibernateAntCodeGeneration">
- <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
- <hibernatetool destdir="${build.dir}">
- <configuration configurationFile="project/src/hibernate.cfg.xml"
propertyFile="hibernate.properties"/>
- <classpath>
- <path location="${build.dir}"/>
- </classpath>
- <hbm2doc>
- <property key="ejb3" value="false"/>
- <property key="jdk5" value="false"/>
- </hbm2doc>
- <hbm2cfgxml>
- <property key="jdk5" value="false"/>
- </hbm2cfgxml>
- <hbm2hbmxml>
- <property key="ejb3" value="false"/>
- <property key="jdk5" value="false"/>
- </hbm2hbmxml>
- <hbmtemplate>
- <property key="ejb3" value="false"/>
- <property key="jdk5" value="false"/>
- </hbmtemplate>
- <hbm2java destdir="outputdir/test">
- <property key="keyXXX" value="valueYYY"/>
- </hbm2java>
- <hbm2ddl export="false">
- <property key="ejb3" value="false"/>
- <property key="jdk5" value="false"/>
- </hbm2ddl>
- <hbm2dao/>
- </hibernatetool>
- </target>
+<project name="CodeGen" default="hibernateAntCodeGeneration">
+ <property name="build.dir" location="reslocation/test"/>
+ <path id="toolslib"/>
+ <target name="hibernateAntCodeGeneration">
+ <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
+ <hibernatetool destdir="${build.dir}">
+ <configuration configurationFile="project/src/hibernate.cfg.xml"
propertyFile="hibernate.properties"/>
+ <classpath>
+ <path location="${build.dir}"/>
+ </classpath>
+ <hbm2doc>
+ <property key="ejb3" value="false"/>
+ <property key="jdk5" value="false"/>
+ </hbm2doc>
+ <hbm2cfgxml>
+ <property key="jdk5" value="false"/>
+ </hbm2cfgxml>
+ <hbm2hbmxml>
+ <property key="ejb3" value="false"/>
+ <property key="jdk5" value="false"/>
+ </hbm2hbmxml>
+ <hbmtemplate>
+ <property key="ejb3" value="false"/>
+ <property key="jdk5" value="false"/>
+ </hbmtemplate>
+ <hbm2java destdir="outputdir/test">
+ <property key="keyXXX" value="valueYYY"/>
+ </hbm2java>
+ <hbm2ddl export="false">
+ <property key="ejb3" value="false"/>
+ <property key="jdk5" value="false"/>
+ </hbm2ddl>
+ <hbm2dao/>
+ </hibernatetool>
+ </target>
</project>
\ No newline at end of file
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenProps_test2.xml
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenProps_test2.xml 2010-09-06
12:00:03 UTC (rev 24734)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenProps_test2.xml 2010-09-06
13:39:19 UTC (rev 24735)
@@ -1,16 +1,16 @@
-<project name="CodeGen" default="hibernateAntCodeGeneration">
- <property name="build.dir" location="reslocation/test"/>
- <path id="toolslib"/>
- <target name="hibernateAntCodeGeneration">
- <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
- <hibernatetool destdir="${build.dir}">
- <configuration configurationFile="project/src/hibernate.cfg.xml"
propertyFile="hibernate.properties"/>
- <classpath>
- <path location="${build.dir}"/>
- </classpath>
- <hbm2java destdir="outputdir/test">
- <property key="keyXXX" value="valueYYY"/>
- </hbm2java>
- </hibernatetool>
- </target>
+<project name="CodeGen" default="hibernateAntCodeGeneration">
+ <property name="build.dir" location="reslocation/test"/>
+ <path id="toolslib"/>
+ <target name="hibernateAntCodeGeneration">
+ <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
+ <hibernatetool destdir="${build.dir}">
+ <configuration configurationFile="project/src/hibernate.cfg.xml"
propertyFile="hibernate.properties"/>
+ <classpath>
+ <path location="${build.dir}"/>
+ </classpath>
+ <hbm2java destdir="outputdir/test">
+ <property key="keyXXX" value="valueYYY"/>
+ </hbm2java>
+ </hibernatetool>
+ </target>
</project>
\ No newline at end of file
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenReveng_test1.xml
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenReveng_test1.xml 2010-09-06
12:00:03 UTC (rev 24734)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenReveng_test1.xml 2010-09-06
13:39:19 UTC (rev 24735)
@@ -1,36 +1,36 @@
-<project name="CodeGen" default="hibernateAntCodeGeneration">
- <property name="build.dir" location="reslocation/test"/>
- <path id="toolslib"/>
- <target name="hibernateAntCodeGeneration">
- <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
- <hibernatetool destdir="${build.dir}">
- <jdbcconfiguration configurationFile="project/src/hibernate.cfg.xml"
propertyFile="project/src/hibernate.properties"
detectManyToMany="true" detectOneToOne="true"
detectOptimisticLock="true" revEngFile="reslocation/test"/>
- <classpath>
- <path location="${build.dir}"/>
- </classpath>
- <hbm2doc>
- <property key="ejb3" value="false"/>
- <property key="jdk5" value="false"/>
- </hbm2doc>
- <hbm2cfgxml>
- <property key="jdk5" value="false"/>
- </hbm2cfgxml>
- <hbm2hbmxml>
- <property key="ejb3" value="false"/>
- <property key="jdk5" value="false"/>
- </hbm2hbmxml>
- <hbmtemplate>
- <property key="ejb3" value="false"/>
- <property key="jdk5" value="false"/>
- </hbmtemplate>
- <hbm2java destdir="outputdir/test">
- <property key="keyXXX" value="valueYYY"/>
- </hbm2java>
- <hbm2ddl export="false">
- <property key="ejb3" value="false"/>
- <property key="jdk5" value="false"/>
- </hbm2ddl>
- <hbm2dao/>
- </hibernatetool>
- </target>
+<project name="CodeGen" default="hibernateAntCodeGeneration">
+ <property name="build.dir" location="reslocation/test"/>
+ <path id="toolslib"/>
+ <target name="hibernateAntCodeGeneration">
+ <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
+ <hibernatetool destdir="${build.dir}">
+ <jdbcconfiguration configurationFile="project/src/hibernate.cfg.xml"
propertyFile="project/src/hibernate.properties"
detectManyToMany="true" detectOneToOne="true"
detectOptimisticLock="true" revEngFile="reslocation/test"/>
+ <classpath>
+ <path location="${build.dir}"/>
+ </classpath>
+ <hbm2doc>
+ <property key="ejb3" value="false"/>
+ <property key="jdk5" value="false"/>
+ </hbm2doc>
+ <hbm2cfgxml>
+ <property key="jdk5" value="false"/>
+ </hbm2cfgxml>
+ <hbm2hbmxml>
+ <property key="ejb3" value="false"/>
+ <property key="jdk5" value="false"/>
+ </hbm2hbmxml>
+ <hbmtemplate>
+ <property key="ejb3" value="false"/>
+ <property key="jdk5" value="false"/>
+ </hbmtemplate>
+ <hbm2java destdir="outputdir/test">
+ <property key="keyXXX" value="valueYYY"/>
+ </hbm2java>
+ <hbm2ddl export="false">
+ <property key="ejb3" value="false"/>
+ <property key="jdk5" value="false"/>
+ </hbm2ddl>
+ <hbm2dao/>
+ </hibernatetool>
+ </target>
</project>
\ No newline at end of file
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenReveng_test2.xml
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenReveng_test2.xml 2010-09-06
12:00:03 UTC (rev 24734)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGenReveng_test2.xml 2010-09-06
13:39:19 UTC (rev 24735)
@@ -1,16 +1,16 @@
-<project name="CodeGen" default="hibernateAntCodeGeneration">
- <property name="build.dir" location="reslocation/test"/>
- <path id="toolslib"/>
- <target name="hibernateAntCodeGeneration">
- <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
- <hibernatetool destdir="${build.dir}">
- <jdbcconfiguration configurationFile="project/src/hibernate.cfg.xml"
propertyFile="project/src/hibernate.properties"
detectManyToMany="true" detectOneToOne="true"
detectOptimisticLock="true" revEngFile="reslocation/test"/>
- <classpath>
- <path location="${build.dir}"/>
- </classpath>
- <hbm2java destdir="outputdir/test">
- <property key="keyXXX" value="valueYYY"/>
- </hbm2java>
- </hibernatetool>
- </target>
+<project name="CodeGen" default="hibernateAntCodeGeneration">
+ <property name="build.dir" location="reslocation/test"/>
+ <path id="toolslib"/>
+ <target name="hibernateAntCodeGeneration">
+ <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
+ <hibernatetool destdir="${build.dir}">
+ <jdbcconfiguration configurationFile="project/src/hibernate.cfg.xml"
propertyFile="project/src/hibernate.properties"
detectManyToMany="true" detectOneToOne="true"
detectOptimisticLock="true" revEngFile="reslocation/test"/>
+ <classpath>
+ <path location="${build.dir}"/>
+ </classpath>
+ <hbm2java destdir="outputdir/test">
+ <property key="keyXXX" value="valueYYY"/>
+ </hbm2java>
+ </hibernatetool>
+ </target>
</project>
\ No newline at end of file
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGen_test1.xml
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGen_test1.xml 2010-09-06
12:00:03 UTC (rev 24734)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGen_test1.xml 2010-09-06
13:39:19 UTC (rev 24735)
@@ -1,38 +1,38 @@
-<project name="CodeGen" default="hibernateAntCodeGeneration">
- <property name="current.dir" location="project/src"/>
- <property name="workspace.dir" location="project/src"/>
- <property name="build.dir" location="12345678901234567890"/>
- <path id="toolslib"/>
- <target name="hibernateAntCodeGeneration">
- <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
- <hibernatetool destdir="${build.dir}">
- <configuration configurationFile="${current.dir}/hibernate.cfg.xml"
propertyFile="${current.dir}/hibernate.properties"/>
- <classpath>
- <path location="${build.dir}"/>
- </classpath>
- <hbm2doc>
- <property key="ejb3" value="false"/>
- <property key="jdk5" value="false"/>
- </hbm2doc>
- <hbm2cfgxml>
- <property key="jdk5" value="false"/>
- </hbm2cfgxml>
- <hbm2hbmxml>
- <property key="ejb3" value="false"/>
- <property key="jdk5" value="false"/>
- </hbm2hbmxml>
- <hbmtemplate>
- <property key="ejb3" value="false"/>
- <property key="jdk5" value="false"/>
- </hbmtemplate>
- <hbm2java destdir="outputdir/test">
- <property key="keyXXX" value="valueYYY"/>
- </hbm2java>
- <hbm2ddl export="false">
- <property key="ejb3" value="false"/>
- <property key="jdk5" value="false"/>
- </hbm2ddl>
- <hbm2dao/>
- </hibernatetool>
- </target>
+<project name="CodeGen" default="hibernateAntCodeGeneration">
+ <property name="current.dir" location="project/src"/>
+ <property name="workspace.dir" location="project/src"/>
+ <property name="build.dir" location="12345678901234567890"/>
+ <path id="toolslib"/>
+ <target name="hibernateAntCodeGeneration">
+ <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
+ <hibernatetool destdir="${build.dir}">
+ <configuration configurationFile="${current.dir}/hibernate.cfg.xml"
propertyFile="${current.dir}/hibernate.properties"/>
+ <classpath>
+ <path location="${build.dir}"/>
+ </classpath>
+ <hbm2doc>
+ <property key="ejb3" value="false"/>
+ <property key="jdk5" value="false"/>
+ </hbm2doc>
+ <hbm2cfgxml>
+ <property key="jdk5" value="false"/>
+ </hbm2cfgxml>
+ <hbm2hbmxml>
+ <property key="ejb3" value="false"/>
+ <property key="jdk5" value="false"/>
+ </hbm2hbmxml>
+ <hbmtemplate>
+ <property key="ejb3" value="false"/>
+ <property key="jdk5" value="false"/>
+ </hbmtemplate>
+ <hbm2java destdir="outputdir/test">
+ <property key="keyXXX" value="valueYYY"/>
+ </hbm2java>
+ <hbm2ddl export="false">
+ <property key="ejb3" value="false"/>
+ <property key="jdk5" value="false"/>
+ </hbm2ddl>
+ <hbm2dao/>
+ </hibernatetool>
+ </target>
</project>
\ No newline at end of file
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGen_test2.xml
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGen_test2.xml 2010-09-06
12:00:03 UTC (rev 24734)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/sample/AntCodeGen_test2.xml 2010-09-06
13:39:19 UTC (rev 24735)
@@ -1,18 +1,18 @@
-<project name="CodeGen" default="hibernateAntCodeGeneration">
- <property name="current.dir" location="project/src"/>
- <property name="workspace.dir" location="project/src"/>
- <property name="build.dir" location="12345678901234567890"/>
- <path id="toolslib"/>
- <target name="hibernateAntCodeGeneration">
- <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
- <hibernatetool destdir="${build.dir}">
- <configuration configurationFile="${current.dir}/hibernate.cfg.xml"
propertyFile="${current.dir}/hibernate.properties"/>
- <classpath>
- <path location="${build.dir}"/>
- </classpath>
- <hbm2java destdir="outputdir/test">
- <property key="keyXXX" value="valueYYY"/>
- </hbm2java>
- </hibernatetool>
- </target>
+<project name="CodeGen" default="hibernateAntCodeGeneration">
+ <property name="current.dir" location="project/src"/>
+ <property name="workspace.dir" location="project/src"/>
+ <property name="build.dir" location="12345678901234567890"/>
+ <path id="toolslib"/>
+ <target name="hibernateAntCodeGeneration">
+ <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
+ <hibernatetool destdir="${build.dir}">
+ <configuration configurationFile="${current.dir}/hibernate.cfg.xml"
propertyFile="${current.dir}/hibernate.properties"/>
+ <classpath>
+ <path location="${build.dir}"/>
+ </classpath>
+ <hbm2java destdir="outputdir/test">
+ <property key="keyXXX" value="valueYYY"/>
+ </hbm2java>
+ </hibernatetool>
+ </target>
</project>
\ No newline at end of file
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/CodeGenXMLFactoryTest.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/CodeGenXMLFactoryTest.java 2010-09-06
12:00:03 UTC (rev 24734)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/CodeGenXMLFactoryTest.java 2010-09-06
13:39:19 UTC (rev 24735)
@@ -11,6 +11,7 @@
package org.hibernate.eclipse.console.test;
import java.io.BufferedReader;
+import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
@@ -24,12 +25,16 @@
import java.util.Map;
import java.util.Properties;
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.DocumentHelper;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.datatools.connectivity.IConnectionProfile;
import org.eclipse.datatools.connectivity.internal.ConnectionProfile;
import org.eclipse.debug.core.ILaunchConfiguration;
+import org.hibernate.console.ConfigurationXMLFactory;
import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
import org.hibernate.eclipse.console.ExtensionManager;
import org.hibernate.eclipse.console.model.impl.ExporterDefinition;
@@ -196,21 +201,43 @@
}
}
+ /**
+ * Parse, i.e. adjust xml text so attributes for same xml
+ * will be in one order.
+ *
+ * @param sample
+ * @return adjusted xml
+ */
+ public String adjustXmlText(String sample) {
+ Document doc = null;
+ try {
+ doc = DocumentHelper.parseText(sample);
+ } catch (DocumentException e) {
+ // ignore
+ }
+ if (doc == null) {
+ return sample;
+ }
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ConfigurationXMLFactory.dump(baos, doc.getRootElement());
+ return baos.toString().trim();
+ }
+
public void testCodeGenXMLFactoryRevengAll() {
CodeGenXMLFactory codeGenFactory = codeGenXMLFactory(true, true, ETestCase.simple);
- String codeGen = codeGenFactory.createCodeGenXML();
+ String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
- String specimen = getSample("AntCodeGenReveng_test1.xml"); //$NON-NLS-1$
- assertEquals(specimen.trim(), codeGen.replaceAll(LN_1, LN_2));
+ String sample = getSample("AntCodeGenReveng_test1.xml"); //$NON-NLS-1$
+ assertEquals(sample, codeGen);
assertEquals(codeGenProperties.length(), 0);
}
public void testCodeGenXMLFactoryRevengOne() {
CodeGenXMLFactory codeGenFactory = codeGenXMLFactory(true, false, ETestCase.simple);
- String codeGen = codeGenFactory.createCodeGenXML();
+ String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
String sample = getSample("AntCodeGenReveng_test2.xml"); //$NON-NLS-1$
- assertEquals(sample.trim(), codeGen.replaceAll(LN_1, LN_2));
+ assertEquals(sample, codeGen);
assertEquals(codeGenProperties.length(), 0);
}
@@ -221,10 +248,10 @@
codeGenFactory.setPlace2Generate(strPlace);
codeGenFactory.setWorkspacePath(strPlace);
//
- String codeGen = codeGenFactory.createCodeGenXML();
+ String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
String sample = getSample("AntCodeGen_test1.xml"); //$NON-NLS-1$
- assertEquals(sample.trim(), codeGen.replaceAll(LN_1, LN_2));
+ assertEquals(sample, codeGen);
assertEquals(codeGenProperties.length(), 0);
}
@@ -235,96 +262,96 @@
codeGenFactory.setPlace2Generate(strPlace);
codeGenFactory.setWorkspacePath(strPlace);
//
- String codeGen = codeGenFactory.createCodeGenXML();
+ String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
String sample = getSample("AntCodeGen_test2.xml"); //$NON-NLS-1$
- assertEquals(sample.trim(), codeGen.replaceAll(LN_1, LN_2));
+ assertEquals(sample, codeGen);
assertEquals(codeGenProperties.length(), 0);
}
public void testCodeGenXMLFactoryJpaAll() {
CodeGenXMLFactory codeGenFactory = codeGenXMLFactory(false, true, ETestCase.jpa);
- String codeGen = codeGenFactory.createCodeGenXML();
+ String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
codeGen = updatePaths(codeGen);
String sample = getSample("AntCodeGenJpa_test1.xml"); //$NON-NLS-1$
- assertEquals(sample.trim(), codeGen.replaceAll(LN_1, LN_2));
+ assertEquals(sample, codeGen);
assertEquals(codeGenProperties.length(), 0);
}
public void testCodeGenXMLFactoryJpaOne() {
CodeGenXMLFactory codeGenFactory = codeGenXMLFactory(false, false, ETestCase.jpa);
- String codeGen = codeGenFactory.createCodeGenXML();
+ String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
codeGen = updatePaths(codeGen);
String sample = getSample("AntCodeGenJpa_test2.xml"); //$NON-NLS-1$
- assertEquals(sample.trim(), codeGen.replaceAll(LN_1, LN_2));
+ assertEquals(sample, codeGen);
assertEquals(codeGenProperties.length(), 0);
}
public void testCodeGenXMLFactoryNullableAll() {
CodeGenXMLFactory codeGenFactory = codeGenXMLFactory(false, true, ETestCase.nullable);
- String codeGen = codeGenFactory.createCodeGenXML();
+ String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
codeGen = updatePaths(codeGen);
String sample = getSample("AntCodeGenNullable_test1.xml"); //$NON-NLS-1$
- assertEquals(sample.trim(), codeGen.replaceAll(LN_1, LN_2));
+ assertEquals(sample, codeGen);
assertEquals(codeGenProperties.length(), 0);
}
public void testCodeGenXMLFactoryNullableOne() {
CodeGenXMLFactory codeGenFactory = codeGenXMLFactory(false, false,
ETestCase.nullable);
- String codeGen = codeGenFactory.createCodeGenXML();
+ String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
codeGen = updatePaths(codeGen);
String sample = getSample("AntCodeGenNullable_test2.xml"); //$NON-NLS-1$
- assertEquals(sample.trim(), codeGen.replaceAll(LN_1, LN_2));
+ assertEquals(sample, codeGen);
assertEquals(codeGenProperties.length(), 0);
}
public void testCodeGenXMLFactoryPropertiesAll() {
CodeGenXMLFactory codeGenFactory = codeGenXMLFactory(false, true,
ETestCase.properties);
- String codeGen = codeGenFactory.createCodeGenXML();
+ String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
codeGen = updatePaths(codeGen);
String sample = getSample("AntCodeGenProps_test1.xml"); //$NON-NLS-1$
String sampleProperties = getSample("AntCodeGenProps.hibernate.properties");
//$NON-NLS-1$
- assertEquals(sample.trim(), codeGen.replaceAll(LN_1, LN_2));
+ assertEquals(sample, codeGen);
assertEquals(sampleProperties.trim(), codeGenProperties);
}
public void testCodeGenXMLFactoryPropertiesOne() {
CodeGenXMLFactory codeGenFactory = codeGenXMLFactory(false, false,
ETestCase.properties);
- String codeGen = codeGenFactory.createCodeGenXML();
+ String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
codeGen = updatePaths(codeGen);
String sample = getSample("AntCodeGenProps_test2.xml"); //$NON-NLS-1$
String sampleProperties = getSample("AntCodeGenProps.hibernate.properties");
//$NON-NLS-1$
- assertEquals(sample.trim(), codeGen.replaceAll(LN_1, LN_2));
+ assertEquals(sample, codeGen);
assertEquals(sampleProperties.trim(), codeGenProperties);
}
public void testCodeGenXMLFactoryInternalPropertiesAll() {
CodeGenXMLFactory codeGenFactory = codeGenXMLFactory(false, true,
ETestCase.properties);
codeGenFactory.setExternalPropFile(false);
- String codeGen = codeGenFactory.createCodeGenXML();
+ String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
codeGen = updatePaths(codeGen);
String sample = getSample("AntCodeGenInternalProps_test1.xml");
//$NON-NLS-1$
String sampleProperties = getSample("AntCodeGenProps.hibernate.properties");
//$NON-NLS-1$
- assertEquals(sample.trim(), codeGen.replaceAll(LN_2, LN_1).replaceAll(LN_1, LN_2));
+ assertEquals(sample, codeGen);
assertEquals(sampleProperties.trim(), codeGenProperties);
}
public void testCodeGenXMLFactoryInternalPropertiesOne() {
CodeGenXMLFactory codeGenFactory = codeGenXMLFactory(false, false,
ETestCase.properties);
codeGenFactory.setExternalPropFile(false);
- String codeGen = codeGenFactory.createCodeGenXML();
+ String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
codeGen = updatePaths(codeGen);
String sample = getSample("AntCodeGenInternalProps_test2.xml");
//$NON-NLS-1$
String sampleProperties = getSample("AntCodeGenProps.hibernate.properties");
//$NON-NLS-1$
- assertEquals(sample.trim(), codeGen.replaceAll(LN_2, LN_1).replaceAll(LN_1, LN_2));
+ assertEquals(sample, codeGen);
assertEquals(sampleProperties.trim(), codeGenProperties);
}
@@ -404,7 +431,7 @@
in.close();
} catch (IOException e) {
}
- return cbuf.toString();
+ return adjustXmlText(cbuf.toString());
}
protected File getResourceItem(String strResPath) throws IOException {