use of org.jboss.tools.hibernate.orm.test.utils.TestLaunchConfig in project jbosstools-hibernate by jbosstools.
the class CodeGenXMLFactoryTest method testCodeGenXMLFactoryJpaAll.
@Test
public void testCodeGenXMLFactoryJpaAll() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(false, true, true);
CodeGenXMLFactory codeGenFactory = new CodeGenXMLFactory4TestJpa(testLaunchConfig);
String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
codeGen = updatePaths(codeGen);
// $NON-NLS-1$
String sample = getSample("AntCodeGenJpa_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 testCodeGenXMLFactoryJpaOne.
@Test
public void testCodeGenXMLFactoryJpaOne() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(false, false, true);
CodeGenXMLFactory codeGenFactory = new CodeGenXMLFactory4TestJpa(testLaunchConfig);
String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
codeGen = updatePaths(codeGen);
// $NON-NLS-1$
String sample = getSample("AntCodeGenJpa_test2.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 testCodeGenXMLFactoryRevengAll.
@Test
public void testCodeGenXMLFactoryRevengAll() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(true, true, false);
CodeGenXMLFactory codeGenFactory = new CodeGenXMLFactory4TestSimple(testLaunchConfig);
String codeGen = adjustXmlText(codeGenFactory.createCodeGenXML());
String codeGenProperties = codeGenFactory.getPropFileContentPreSave();
// $NON-NLS-1$
String sample = getSample("AntCodeGenReveng_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 testCodeGenXMLFactoryOne.
@Test
public void testCodeGenXMLFactoryOne() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(false, false, 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_test2.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 testCodeGenXMLFactoryInternalPropertiesOne.
@Test
public void testCodeGenXMLFactoryInternalPropertiesOne() {
TestLaunchConfig testLaunchConfig = createTestLaunchConfig(false, false, 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_test2.xml");
// $NON-NLS-1$
String sampleProperties = getSample("AntCodeGenPropsInternal.hibernate.properties");
Assert.assertEquals(sample, codeGen);
Assert.assertEquals(sampleProperties.trim(), codeGenProperties);
}
Aggregations