use of org.jboss.tools.hibernate.runtime.common.AbstractClassMetadataFacade in project jbosstools-hibernate by jbosstools.
the class ClassMetadataFacadeTest method testGetEntityMetaModel.
@Test
public void testGetEntityMetaModel() {
Assert.assertNull(classMetadata.getEntityMetamodel());
Assert.assertNull(methodName);
TestEntityPersister entityPersister = createSampleEntityPersister();
classMetadata = new AbstractClassMetadataFacade(FACADE_FACTORY, entityPersister) {
};
Assert.assertNull(classMetadata.getEntityMetamodel());
Assert.assertEquals("getEntityMetamodel", methodName);
entityPersister.initializeEntityMetamodel();
methodName = null;
Assert.assertNotNull(classMetadata.getEntityMetamodel());
Assert.assertEquals("getEntityMetamodel", methodName);
}
use of org.jboss.tools.hibernate.runtime.common.AbstractClassMetadataFacade in project jbosstools-hibernate by jbosstools.
the class ClassMetadataFacadeTest method setUp.
@Before
public void setUp() {
ClassMetadata target = (ClassMetadata) Proxy.newProxyInstance(FACADE_FACTORY.getClassLoader(), new Class[] { ClassMetadata.class }, new TestInvocationHandler());
classMetadata = new AbstractClassMetadataFacade(FACADE_FACTORY, target) {
};
}
use of org.jboss.tools.hibernate.runtime.common.AbstractClassMetadataFacade in project jbosstools-hibernate by jbosstools.
the class ClassMetadataFacadeTest method testGetEntityMetaModel.
@Test
public void testGetEntityMetaModel() {
Assert.assertNull(classMetadata.getEntityMetamodel());
Assert.assertNull(methodName);
TestEntityPersister entityPersister = createSampleEntityPersister();
classMetadata = new AbstractClassMetadataFacade(FACADE_FACTORY, entityPersister) {
};
methodName = null;
Assert.assertNotNull(classMetadata.getEntityMetamodel());
Assert.assertEquals("getEntityMetamodel", methodName);
}
use of org.jboss.tools.hibernate.runtime.common.AbstractClassMetadataFacade in project jbosstools-hibernate by jbosstools.
the class ClassMetadataFacadeTest method setUp.
@Before
public void setUp() {
ClassMetadata target = (ClassMetadata) Proxy.newProxyInstance(FACADE_FACTORY.getClassLoader(), new Class[] { ClassMetadata.class }, new TestInvocationHandler());
classMetadata = new AbstractClassMetadataFacade(FACADE_FACTORY, target) {
};
}
use of org.jboss.tools.hibernate.runtime.common.AbstractClassMetadataFacade in project jbosstools-hibernate by jbosstools.
the class ClassMetadataFacadeTest method testGetEntityMetaModel.
@Test
public void testGetEntityMetaModel() {
Assert.assertNull(classMetadata.getEntityMetamodel());
Assert.assertNull(methodName);
TestEntityPersister entityPersister = createSampleEntityPersister();
classMetadata = new AbstractClassMetadataFacade(FACADE_FACTORY, entityPersister) {
};
Assert.assertNull(classMetadata.getEntityMetamodel());
Assert.assertEquals("getEntityMetamodel", methodName);
entityPersister.initializeEntityMetamodel();
methodName = null;
Assert.assertNotNull(classMetadata.getEntityMetamodel());
Assert.assertEquals("getEntityMetamodel", methodName);
}
Aggregations