Search in sources :

Example 1 with TestConsoleConfigurationPreferences

use of org.jboss.tools.hibernate.orm.test.utils.TestConsoleConfigurationPreferences in project jbosstools-hibernate by jbosstools.

the class ConsoleConfigurationTest method setUp.

@Before
public void setUp() throws Exception {
    cfgXmlFile = new File(temporaryFolder.getRoot(), "hibernate.cfg.xml");
    FileWriter fw = new FileWriter(cfgXmlFile);
    fw.write(HIBERNATE_CFG_XML);
    fw.close();
    TestConsoleConfigurationPreferences cfgprefs = new TestConsoleConfigurationPreferences(cfgXmlFile);
    consoleCfg = new ConsoleConfiguration(cfgprefs);
    service = consoleCfg.getHibernateExtension().getHibernateService();
    typeFactory = service.newTypeFactory();
    KnownConfigurations.getInstance().addConfiguration(consoleCfg, true);
}
Also used : ConsoleConfiguration(org.hibernate.console.ConsoleConfiguration) FileWriter(java.io.FileWriter) File(java.io.File) TestConsoleConfigurationPreferences(org.jboss.tools.hibernate.orm.test.utils.TestConsoleConfigurationPreferences) Before(org.junit.Before)

Example 2 with TestConsoleConfigurationPreferences

use of org.jboss.tools.hibernate.orm.test.utils.TestConsoleConfigurationPreferences in project jbosstools-hibernate by jbosstools.

the class QueryParametersTest method setUp.

@Before
public void setUp() throws Exception {
    cfgXmlFile = new File(temporaryFolder.getRoot(), "hibernate.cfg.xml");
    FileWriter fw = new FileWriter(cfgXmlFile);
    fw.write(HIBERNATE_CFG_XML);
    fw.close();
    TestConsoleConfigurationPreferences cfgprefs = new TestConsoleConfigurationPreferences(cfgXmlFile);
    consoleCfg = new ConsoleConfiguration(cfgprefs);
    KnownConfigurations.getInstance().addConfiguration(consoleCfg, true);
    service = consoleCfg.getHibernateExtension().getHibernateService();
}
Also used : ConsoleConfiguration(org.hibernate.console.ConsoleConfiguration) FileWriter(java.io.FileWriter) File(java.io.File) TestConsoleConfigurationPreferences(org.jboss.tools.hibernate.orm.test.utils.TestConsoleConfigurationPreferences) Before(org.junit.Before)

Example 3 with TestConsoleConfigurationPreferences

use of org.jboss.tools.hibernate.orm.test.utils.TestConsoleConfigurationPreferences in project jbosstools-hibernate by jbosstools.

the class CriteriaEditorTest method setUp.

@Before
public void setUp() throws Exception {
    cfgXmlFile = new File(temporaryFolder.getRoot(), "hibernate.cfg.xml");
    FileWriter fw = new FileWriter(cfgXmlFile);
    fw.write(HIBERNATE_CFG_XML);
    fw.close();
    consolePrefs = new TestConsoleConfigurationPreferences(cfgXmlFile);
    consoleConfiguration = new ConsoleConfiguration(consolePrefs);
    KnownConfigurations.getInstance().addConfiguration(consoleConfiguration, false);
}
Also used : ConsoleConfiguration(org.hibernate.console.ConsoleConfiguration) FileWriter(java.io.FileWriter) File(java.io.File) TestConsoleConfigurationPreferences(org.jboss.tools.hibernate.orm.test.utils.TestConsoleConfigurationPreferences) Before(org.junit.Before)

Example 4 with TestConsoleConfigurationPreferences

use of org.jboss.tools.hibernate.orm.test.utils.TestConsoleConfigurationPreferences in project jbosstools-hibernate by jbosstools.

the class ExporterAttributesTest method setUp.

@Before
public void setUp() throws Exception {
    cfgXmlFile = new File(temporaryFolder.getRoot(), "hibernate.cfg.xml");
    FileWriter fw = new FileWriter(cfgXmlFile);
    fw.write(HIBERNATE_CFG_XML);
    fw.close();
    this.project = new LaunchConfigTestProject();
    TestConsoleConfigurationPreferences cfgprefs = new TestConsoleConfigurationPreferences(cfgXmlFile);
    consoleCfg = new ConsoleConfiguration(cfgprefs);
    service = consoleCfg.getHibernateExtension().getHibernateService();
    KnownConfigurations.getInstance().addConfiguration(consoleCfg, true);
}
Also used : ConsoleConfiguration(org.hibernate.console.ConsoleConfiguration) LaunchConfigTestProject(org.jboss.tools.hibernate.orm.test.utils.project.LaunchConfigTestProject) FileWriter(java.io.FileWriter) IFile(org.eclipse.core.resources.IFile) File(java.io.File) TestConsoleConfigurationPreferences(org.jboss.tools.hibernate.orm.test.utils.TestConsoleConfigurationPreferences) Before(org.junit.Before)

Example 5 with TestConsoleConfigurationPreferences

use of org.jboss.tools.hibernate.orm.test.utils.TestConsoleConfigurationPreferences in project jbosstools-hibernate by jbosstools.

the class HQLEditorTest method setUp.

@Before
public void setUp() throws Exception {
    cfgXmlFile = new File(temporaryFolder.getRoot(), "hibernate.cfg.xml");
    FileWriter fw = new FileWriter(cfgXmlFile);
    fw.write(HIBERNATE_CFG_XML);
    fw.close();
    consolePrefs = new TestConsoleConfigurationPreferences(cfgXmlFile);
    consoleConfiguration = new ConsoleConfiguration(consolePrefs);
    KnownConfigurations.getInstance().addConfiguration(consoleConfiguration, false);
}
Also used : ConsoleConfiguration(org.hibernate.console.ConsoleConfiguration) FileWriter(java.io.FileWriter) File(java.io.File) TestConsoleConfigurationPreferences(org.jboss.tools.hibernate.orm.test.utils.TestConsoleConfigurationPreferences) Before(org.junit.Before)

Aggregations

File (java.io.File)5 FileWriter (java.io.FileWriter)5 ConsoleConfiguration (org.hibernate.console.ConsoleConfiguration)5 TestConsoleConfigurationPreferences (org.jboss.tools.hibernate.orm.test.utils.TestConsoleConfigurationPreferences)5 Before (org.junit.Before)5 IFile (org.eclipse.core.resources.IFile)1 LaunchConfigTestProject (org.jboss.tools.hibernate.orm.test.utils.project.LaunchConfigTestProject)1