Author: vyemialyanchyk
Date: 2010-11-30 12:06:44 -0500 (Tue, 30 Nov 2010)
New Revision: 27031
Modified:
branches/jbosstools-3.2.0.Beta2/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenXMLFactory.java
branches/jbosstools-3.2.0.Beta2/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/CodeGenXMLFactoryTest.java
Log:
https://jira.jboss.org/browse/JBIDE-7746 - try to fix - add snip of test code - to find
what happen on Hudson...
Modified:
branches/jbosstools-3.2.0.Beta2/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenXMLFactory.java
===================================================================
---
branches/jbosstools-3.2.0.Beta2/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenXMLFactory.java 2010-11-30
16:36:44 UTC (rev 27030)
+++
branches/jbosstools-3.2.0.Beta2/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenXMLFactory.java 2010-11-30
17:06:44 UTC (rev 27031)
@@ -556,4 +556,9 @@
externalPropFileName = fileName + "." + externalPropFileName; //$NON-NLS-1$
return externalPropFileName;
}
+
+ // special test code -> to fix tests on Hudson...
+ public String getVersionTestMarker() {
+ return "qwerty"; //$NON-NLS-1$
+ }
}
Modified:
branches/jbosstools-3.2.0.Beta2/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/CodeGenXMLFactoryTest.java
===================================================================
---
branches/jbosstools-3.2.0.Beta2/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/CodeGenXMLFactoryTest.java 2010-11-30
16:36:44 UTC (rev 27030)
+++
branches/jbosstools-3.2.0.Beta2/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/CodeGenXMLFactoryTest.java 2010-11-30
17:06:44 UTC (rev 27031)
@@ -234,6 +234,7 @@
public void testCodeGenXMLFactoryRevengAll() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(true, true, false);
CodeGenXMLFactory codeGenFactory = new CodeGenXMLFactory4TestSimple(testLaunchConfig);
+ assertEquals(codeGenFactory.getVersionTestMarker(), "qwerty"); //$NON-NLS-1$
String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
String sample = getSample("AntCodeGenReveng_test1.xml"); //$NON-NLS-1$
@@ -244,6 +245,7 @@
public void testCodeGenXMLFactoryRevengOne() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(true, false, false);
CodeGenXMLFactory codeGenFactory = new CodeGenXMLFactory4TestSimple(testLaunchConfig);
+ assertEquals(codeGenFactory.getVersionTestMarker(), "qwerty"); //$NON-NLS-1$
String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
String sample = getSample("AntCodeGenReveng_test2.xml"); //$NON-NLS-1$
@@ -254,6 +256,7 @@
public void testCodeGenXMLFactoryAll() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(false, true, false);
CodeGenXMLFactory codeGenFactory = new
CodeGenXMLFactory4TestRelative(testLaunchConfig);
+ assertEquals(codeGenFactory.getVersionTestMarker(), "qwerty"); //$NON-NLS-1$
//
String strPlace = "project/src"; //$NON-NLS-1$
codeGenFactory.setPlace2Generate(strPlace);
@@ -269,6 +272,7 @@
public void testCodeGenXMLFactoryOne() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(false, false, false);
CodeGenXMLFactory codeGenFactory = new
CodeGenXMLFactory4TestRelative(testLaunchConfig);
+ assertEquals(codeGenFactory.getVersionTestMarker(), "qwerty"); //$NON-NLS-1$
//
String strPlace = "project/src"; //$NON-NLS-1$
codeGenFactory.setPlace2Generate(strPlace);
@@ -284,6 +288,7 @@
public void testCodeGenXMLFactoryJpaAll() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(false, true, true);
CodeGenXMLFactory codeGenFactory = new CodeGenXMLFactory4TestJpa(testLaunchConfig);
+ assertEquals(codeGenFactory.getVersionTestMarker(), "qwerty"); //$NON-NLS-1$
String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
codeGen = updatePaths(codeGen);
@@ -295,6 +300,7 @@
public void testCodeGenXMLFactoryJpaOne() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(false, false, true);
CodeGenXMLFactory codeGenFactory = new CodeGenXMLFactory4TestJpa(testLaunchConfig);
+ assertEquals(codeGenFactory.getVersionTestMarker(), "qwerty"); //$NON-NLS-1$
String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
codeGen = updatePaths(codeGen);
@@ -306,6 +312,7 @@
public void testCodeGenXMLFactoryNullableAll() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(false, true, false);
CodeGenXMLFactory codeGenFactory = new
CodeGenXMLFactory4TestNullable(testLaunchConfig);
+ assertEquals(codeGenFactory.getVersionTestMarker(), "qwerty"); //$NON-NLS-1$
String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
codeGen = updatePaths(codeGen);
@@ -317,6 +324,7 @@
public void testCodeGenXMLFactoryNullableOne() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(false, false, false);
CodeGenXMLFactory codeGenFactory = new
CodeGenXMLFactory4TestNullable(testLaunchConfig);
+ assertEquals(codeGenFactory.getVersionTestMarker(), "qwerty"); //$NON-NLS-1$
String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
codeGen = updatePaths(codeGen);
@@ -328,6 +336,7 @@
public void testCodeGenXMLFactoryPropertiesAll() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(false, true, false);
CodeGenXMLFactory codeGenFactory = new
CodeGenXMLFactory4TestProperties(testLaunchConfig);
+ assertEquals(codeGenFactory.getVersionTestMarker(), "qwerty"); //$NON-NLS-1$
String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
codeGen = updatePaths(codeGen);
@@ -340,6 +349,7 @@
public void testCodeGenXMLFactoryPropertiesOne() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(false, false, false);
CodeGenXMLFactory codeGenFactory = new
CodeGenXMLFactory4TestProperties(testLaunchConfig);
+ assertEquals(codeGenFactory.getVersionTestMarker(), "qwerty"); //$NON-NLS-1$
String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
codeGen = updatePaths(codeGen);
@@ -352,6 +362,7 @@
public void testCodeGenXMLFactoryInternalPropertiesAll() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(false, true, false);
CodeGenXMLFactory codeGenFactory = new
CodeGenXMLFactory4TestProperties(testLaunchConfig);
+ assertEquals(codeGenFactory.getVersionTestMarker(), "qwerty"); //$NON-NLS-1$
codeGenFactory.setExternalPropFile(false);
String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
@@ -365,6 +376,7 @@
public void testCodeGenXMLFactoryInternalPropertiesOne() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(false, false, false);
CodeGenXMLFactory codeGenFactory = new
CodeGenXMLFactory4TestProperties(testLaunchConfig);
+ assertEquals(codeGenFactory.getVersionTestMarker(), "qwerty"); //$NON-NLS-1$
codeGenFactory.setExternalPropFile(false);
String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();