use of org.jboss.tools.hibernate.runtime.common.AbstractPropertyFacade in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateSpecialRootClass.
@Test
public void testCreateSpecialRootClass() {
Property property = new Property();
property.setValue(new SimpleValue());
IProperty propertyFacade = new AbstractPropertyFacade(facadeFactory, property) {
};
IPersistentClass specialRootClass = facadeFactory.createSpecialRootClass(propertyFacade);
Assert.assertSame(property, ((IFacade) specialRootClass.getProperty()).getTarget());
}
use of org.jboss.tools.hibernate.runtime.common.AbstractPropertyFacade in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateSpecialRootClass.
@Test
public void testCreateSpecialRootClass() {
Property property = new Property();
Mappings m = (Mappings) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { Mappings.class }, new TestInvocationHandler());
property.setValue(new SimpleValue(m));
IProperty propertyFacade = new AbstractPropertyFacade(facadeFactory, property) {
};
IPersistentClass specialRootClass = facadeFactory.createSpecialRootClass(propertyFacade);
Assert.assertSame(property, ((IFacade) specialRootClass.getProperty()).getTarget());
}
use of org.jboss.tools.hibernate.runtime.common.AbstractPropertyFacade in project jbosstools-hibernate by jbosstools.
the class Cfg2HbmToolFacadeTest method testGetPropertyTag.
public void testGetPropertyTag() throws Exception {
RootClass rc = new RootClass();
Property p = new Property();
Mappings m = (Mappings) Proxy.newProxyInstance(FACADE_FACTORY.getClassLoader(), new Class[] { Mappings.class }, new TestInvocationHandler());
SimpleValue sv = new SimpleValue(m);
sv.setTypeName("foobar");
p.setValue(sv);
p.setPersistentClass(rc);
rc.setVersion(p);
IProperty property = new AbstractPropertyFacade(FACADE_FACTORY, p) {
};
Assert.assertEquals("version", cfg2HbmToolFacade.getTag(property));
}
use of org.jboss.tools.hibernate.runtime.common.AbstractPropertyFacade in project jbosstools-hibernate by jbosstools.
the class Cfg2HbmToolFacadeTest method testGetPropertyTag.
public void testGetPropertyTag() throws Exception {
RootClass rc = new RootClass(null);
Property p = new Property();
MetadataImplementor m = (MetadataImplementor) Proxy.newProxyInstance(FACADE_FACTORY.getClassLoader(), new Class[] { MetadataImplementor.class }, new TestInvocationHandler());
SimpleValue sv = new SimpleValue(m);
sv.setTypeName("foobar");
p.setValue(sv);
p.setPersistentClass(rc);
rc.setVersion(p);
IProperty property = new AbstractPropertyFacade(FACADE_FACTORY, p) {
};
Assert.assertEquals("version", cfg2HbmToolFacade.getTag(property));
}
use of org.jboss.tools.hibernate.runtime.common.AbstractPropertyFacade in project jbosstools-hibernate by jbosstools.
the class Cfg2HbmToolFacadeTest method testGetPropertyTag.
public void testGetPropertyTag() throws Exception {
RootClass rc = new RootClass(null);
Property p = new Property();
MetadataImplementor m = (MetadataImplementor) Proxy.newProxyInstance(FACADE_FACTORY.getClassLoader(), new Class[] { MetadataImplementor.class }, new TestInvocationHandler());
SimpleValue sv = new SimpleValue(m);
sv.setTypeName("foobar");
p.setValue(sv);
p.setPersistentClass(rc);
rc.setVersion(p);
IProperty property = new AbstractPropertyFacade(FACADE_FACTORY, p) {
};
Assert.assertEquals("version", cfg2HbmToolFacade.getTag(property));
}
Aggregations