use of org.hibernate.eclipse.launch.CodeGenXMLFactory in project jbosstools-hibernate by jbosstools.
the class CodeGenXMLFactoryTest method testCodeGenXMLFactoryInternalPropertiesAll.
@Test
public void testCodeGenXMLFactoryInternalPropertiesAll() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(false, true, false);
CodeGenXMLFactory codeGenFactory = new CodeGenXMLFactory4TestProperties(testLaunchConfig);
codeGenFactory.setExternalPropFile(false);
String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
codeGen = updatePaths(codeGen);
// $NON-NLS-1$
String sample = getSample("AntCodeGenInternalProps_test1.xml");
// $NON-NLS-1$
String sampleProperties = getSample("AntCodeGenPropsInternal.hibernate.properties");
Assert.assertEquals(sample, codeGen);
Assert.assertEquals(sampleProperties.trim(), codeGenProperties);
}
use of org.hibernate.eclipse.launch.CodeGenXMLFactory in project jbosstools-hibernate by jbosstools.
the class CodeGenXMLFactoryTest method testCodeGenXMLFactoryPropertiesAll.
@Test
public void testCodeGenXMLFactoryPropertiesAll() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(false, true, false);
CodeGenXMLFactory codeGenFactory = new CodeGenXMLFactory4TestProperties(testLaunchConfig);
String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
codeGen = updatePaths(codeGen);
// $NON-NLS-1$
String sample = getSample("AntCodeGenProps_test1.xml");
// $NON-NLS-1$
String sampleProperties = getSample("AntCodeGenProps.hibernate.properties");
Assert.assertEquals(sample, codeGen);
Assert.assertEquals(sampleProperties.trim(), codeGenProperties);
}
use of org.hibernate.eclipse.launch.CodeGenXMLFactory in project jbosstools-hibernate by jbosstools.
the class CodeGenXMLFactoryTest method testCodeGenXMLFactoryRevengOne.
@Test
public void testCodeGenXMLFactoryRevengOne() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(true, false, false);
CodeGenXMLFactory codeGenFactory = new CodeGenXMLFactory4TestSimple(testLaunchConfig);
String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
// $NON-NLS-1$
String sample = getSample("AntCodeGenReveng_test2.xml");
Assert.assertEquals(sample, codeGen);
Assert.assertEquals(codeGenProperties.length(), 0);
}
use of org.hibernate.eclipse.launch.CodeGenXMLFactory in project jbosstools-hibernate by jbosstools.
the class CodeGenXMLFactoryTest method testCodeGenXMLFactoryNullableOne.
@Test
public void testCodeGenXMLFactoryNullableOne() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(false, false, false);
CodeGenXMLFactory codeGenFactory = new CodeGenXMLFactory4TestNullable(testLaunchConfig);
String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
codeGen = updatePaths(codeGen);
// $NON-NLS-1$
String sample = getSample("AntCodeGenNullable_test2.xml");
Assert.assertEquals(sample, codeGen);
Assert.assertEquals(codeGenProperties.length(), 0);
}
use of org.hibernate.eclipse.launch.CodeGenXMLFactory in project jbosstools-hibernate by jbosstools.
the class CodeGenXMLFactoryTest method testCodeGenXMLFactoryNullableAll.
@Test
public void testCodeGenXMLFactoryNullableAll() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(false, true, false);
CodeGenXMLFactory codeGenFactory = new CodeGenXMLFactory4TestNullable(testLaunchConfig);
String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
codeGen = updatePaths(codeGen);
// $NON-NLS-1$
String sample = getSample("AntCodeGenNullable_test1.xml");
Assert.assertEquals(sample, codeGen);
Assert.assertEquals(codeGenProperties.length(), 0);
}
Aggregations