Search in sources :

Example 1 with IHQLCodeAssist

use of org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist in project jbosstools-hibernate by jbosstools.

the class ServiceImplTest method testNewHQLCodeAssist.

@Test
public void testNewHQLCodeAssist() {
    IConfiguration configuration = service.newDefaultConfiguration();
    configuration.setProperty(AvailableSettings.DIALECT, TestDialect.class.getName());
    IHQLCodeAssist hqlCodeAssist = service.newHQLCodeAssist(configuration);
    assertNotNull(hqlCodeAssist);
}
Also used : IHQLCodeAssist(org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist) IConfiguration(org.jboss.tools.hibernate.runtime.spi.IConfiguration) Test(org.junit.jupiter.api.Test)

Example 2 with IHQLCodeAssist

use of org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist in project jbosstools-hibernate by jbosstools.

the class ServiceImplTest method testNewHQLCodeAssist.

@Test
public void testNewHQLCodeAssist() {
    IConfiguration configuration = service.newDefaultConfiguration();
    configuration.setProperty(AvailableSettings.DIALECT, MockDialect.class.getName());
    configuration.setProperty(AvailableSettings.CONNECTION_PROVIDER, MockConnectionProvider.class.getName());
    IHQLCodeAssist hqlCodeAssist = service.newHQLCodeAssist(configuration);
    assertNotNull(hqlCodeAssist);
}
Also used : MockConnectionProvider(org.jboss.tools.hibernate.runtime.v_5_4.internal.util.MockConnectionProvider) IHQLCodeAssist(org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist) MockDialect(org.jboss.tools.hibernate.runtime.v_5_4.internal.util.MockDialect) IConfiguration(org.jboss.tools.hibernate.runtime.spi.IConfiguration) Test(org.junit.jupiter.api.Test)

Example 3 with IHQLCodeAssist

use of org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist in project jbosstools-hibernate by jbosstools.

the class FacadeFactoryTest method testCreateHQLCodeAssist.

@Test
public void testCreateHQLCodeAssist() {
    Configuration configuration = new Configuration();
    HQLCodeAssist hqlCodeAssist = new HQLCodeAssist(configuration);
    IHQLCodeAssist facade = facadeFactory.createHQLCodeAssist(hqlCodeAssist);
    assertSame(hqlCodeAssist, ((IFacade) facade).getTarget());
}
Also used : HQLCodeAssist(org.hibernate.tool.ide.completion.HQLCodeAssist) IHQLCodeAssist(org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist) Configuration(org.hibernate.cfg.Configuration) IConfiguration(org.jboss.tools.hibernate.runtime.spi.IConfiguration) IHQLCodeAssist(org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist) Test(org.junit.jupiter.api.Test)

Example 4 with IHQLCodeAssist

use of org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist in project jbosstools-hibernate by jbosstools.

the class FacadeFactoryTest method testCreateHQLCodeAssist.

@Test
public void testCreateHQLCodeAssist() {
    Configuration configuration = new Configuration();
    configuration.setProperty(AvailableSettings.DIALECT, TestDialect.class.getName());
    HQLCodeAssist hqlCodeAssist = new HQLCodeAssist(configuration);
    IHQLCodeAssist facade = facadeFactory.createHQLCodeAssist(hqlCodeAssist);
    assertSame(hqlCodeAssist, ((IFacade) facade).getTarget());
}
Also used : HQLCodeAssist(org.hibernate.tool.ide.completion.HQLCodeAssist) IHQLCodeAssist(org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist) Configuration(org.hibernate.cfg.Configuration) IConfiguration(org.jboss.tools.hibernate.runtime.spi.IConfiguration) IHQLCodeAssist(org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist) Test(org.junit.jupiter.api.Test)

Example 5 with IHQLCodeAssist

use of org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist in project jbosstools-hibernate by jbosstools.

the class ServiceImplTest method testNewHQLCodeAssist.

@Test
public void testNewHQLCodeAssist() {
    IConfiguration configuration = service.newDefaultConfiguration();
    configuration.setProperty(AvailableSettings.DIALECT, TestDialect.class.getName());
    IHQLCodeAssist hqlCodeAssist = service.newHQLCodeAssist(configuration);
    assertNotNull(hqlCodeAssist);
}
Also used : IHQLCodeAssist(org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist) IConfiguration(org.jboss.tools.hibernate.runtime.spi.IConfiguration) Test(org.junit.jupiter.api.Test)

Aggregations

IHQLCodeAssist (org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist)24 Test (org.junit.jupiter.api.Test)22 IConfiguration (org.jboss.tools.hibernate.runtime.spi.IConfiguration)15 HQLCodeAssist (org.hibernate.tool.ide.completion.HQLCodeAssist)12 MetadataSources (org.hibernate.boot.MetadataSources)6 StandardServiceRegistryBuilder (org.hibernate.boot.registry.StandardServiceRegistryBuilder)6 Configuration (org.hibernate.cfg.Configuration)4 MockDialect (org.jboss.tools.hibernate.runtime.v_5_3.internal.util.MockDialect)2 MockConnectionProvider (org.jboss.tools.hibernate.runtime.v_5_4.internal.util.MockConnectionProvider)2 MockDialect (org.jboss.tools.hibernate.runtime.v_5_4.internal.util.MockDialect)2 MockConnectionProvider (org.jboss.tools.hibernate.runtime.v_5_5.internal.util.MockConnectionProvider)2 MockDialect (org.jboss.tools.hibernate.runtime.v_5_5.internal.util.MockDialect)2 MockConnectionProvider (org.jboss.tools.hibernate.runtime.v_5_6.internal.util.MockConnectionProvider)2 MockDialect (org.jboss.tools.hibernate.runtime.v_5_6.internal.util.MockDialect)2 HibernateException (org.jboss.tools.hibernate.runtime.spi.HibernateException)1 MockConnectionProvider (org.jboss.tools.hibernate.runtime.v_6_0.internal.util.MockConnectionProvider)1 MockDialect (org.jboss.tools.hibernate.runtime.v_6_0.internal.util.MockDialect)1 Test (org.junit.Test)1