use of org.jboss.tools.hibernate.orm.test.utils.TestLaunchConfig in project jbosstools-hibernate by jbosstools.
the class CodeGenXMLFactoryTest method testCodeGenXMLFactoryPropertiesOne.
@Test
public void testCodeGenXMLFactoryPropertiesOne() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(false, false, 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_test2.xml");
// $NON-NLS-1$
String sampleProperties = getSample("AntCodeGenProps.hibernate.properties");
Assert.assertEquals(sample, codeGen);
Assert.assertEquals(sampleProperties.trim(), codeGenProperties);
}
use of org.jboss.tools.hibernate.orm.test.utils.TestLaunchConfig in project jbosstools-hibernate by jbosstools.
the class CodeGenXMLFactoryTest method createTestLaunchConfig.
private TestLaunchConfig createTestLaunchConfig(boolean reveng, boolean exportersAll, boolean jpa) {
Map<String, Object> testLaunchConfigAttr = getTestLaunchConfigAttr(reveng, exportersAll, jpa);
TestLaunchConfig testLaunchConfig = new TestLaunchConfig(testLaunchConfigAttr);
return testLaunchConfig;
}
use of org.jboss.tools.hibernate.orm.test.utils.TestLaunchConfig 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);
}
use of org.jboss.tools.hibernate.orm.test.utils.TestLaunchConfig in project jbosstools-hibernate by jbosstools.
the class CodeGenXMLFactoryTest method testCodeGenXMLFactoryAll.
@Test
public void testCodeGenXMLFactoryAll() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(false, true, false);
CodeGenXMLFactory codeGenFactory = new CodeGenXMLFactory4TestRelative(testLaunchConfig);
//
// $NON-NLS-1$
String strPlace = "project/src";
codeGenFactory.setPlace2Generate(strPlace);
codeGenFactory.setWorkspacePath(strPlace);
//
String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
// $NON-NLS-1$
String sample = getSample("AntCodeGen_test1.xml");
Assert.assertEquals(sample, codeGen);
Assert.assertEquals(codeGenProperties.length(), 0);
}
Aggregations