use of org.jboss.tools.hibernate.runtime.spi.IValue in project jbosstools-hibernate by jbosstools.
the class ValueFacadeTest method testSetIndex.
@Test
public void testSetIndex() {
List valueTarget = new List(null);
valueFacade = FACADE_FACTORY.createValue(valueTarget);
Assert.assertNull(valueTarget.getIndex());
SimpleValue indexTarget = new SimpleValue();
IValue indexFacade = FACADE_FACTORY.createValue(indexTarget);
valueFacade.setIndex(indexFacade);
Assert.assertSame(indexTarget, valueTarget.getIndex());
}
use of org.jboss.tools.hibernate.runtime.spi.IValue in project jbosstools-hibernate by jbosstools.
the class ColumnFacadeTest method testGetValue.
public void testGetValue() throws Exception {
Value targetValue = null;
column.setValue(targetValue);
Assert.assertNull(columnFacade.getValue());
targetValue = new SimpleValue(new Configuration().createMappings());
column.setValue(targetValue);
IValue value = columnFacade.getValue();
Assert.assertNotNull(value);
Assert.assertSame(targetValue, ((IFacade) value).getTarget());
}
use of org.jboss.tools.hibernate.runtime.spi.IValue in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testGetIdentifierValue.
@Test
public void testGetIdentifierValue() {
Table table = new Table();
ITable tableFacade = FACADE_FACTORY.createTable(table);
IValue valueFacade = tableFacade.getIdentifierValue();
Assert.assertNull(valueFacade);
KeyValue value = new SimpleValue(null);
table.setIdentifierValue(value);
valueFacade = tableFacade.getIdentifierValue();
Assert.assertSame(value, ((IFacade) valueFacade).getTarget());
}
use of org.jboss.tools.hibernate.runtime.spi.IValue in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateValue.
@Test
public void testCreateValue() {
Value value = (Value) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { Value.class }, new TestInvocationHandler());
IValue facade = facadeFactory.createValue(value);
Assert.assertSame(value, ((IFacade) facade).getTarget());
}
use of org.jboss.tools.hibernate.runtime.spi.IValue in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateValue.
@Test
public void testCreateValue() {
Value value = (Value) Proxy.newProxyInstance(facadeFactory.getClassLoader(), new Class[] { Value.class }, new TestInvocationHandler());
IValue facade = facadeFactory.createValue(value);
Assert.assertSame(value, ((IFacade) facade).getTarget());
}
Aggregations