use of org.jboss.tools.hibernate.runtime.spi.IColumn in project jbosstools-hibernate by jbosstools.
the class ForeignKeyFacadeTest method testContainsColumn.
@Test
public void testContainsColumn() {
Column column = new Column();
IColumn columnFacade = FACADE_FACTORY.createColumn(column);
Assert.assertFalse(foreignKeyFacade.containsColumn(columnFacade));
Assert.assertEquals("containsColumn", methodName);
Assert.assertArrayEquals(new Object[] { column }, arguments);
foreignKey.addColumn(column);
reset();
Assert.assertTrue(foreignKeyFacade.containsColumn(columnFacade));
Assert.assertEquals("containsColumn", methodName);
Assert.assertArrayEquals(new Object[] { column }, arguments);
}
use of org.jboss.tools.hibernate.runtime.spi.IColumn in project jbosstools-hibernate by jbosstools.
the class ForeignKeyFacadeTest method testColumnIterator.
@Test
public void testColumnIterator() {
Column column = new Column();
foreignKey.addColumn(column);
reset();
Iterator<IColumn> iterator = foreignKeyFacade.columnIterator();
Assert.assertEquals("columnIterator", methodName);
Assert.assertArrayEquals(new Object[] {}, arguments);
IColumn columnFacade = iterator.next();
Assert.assertSame(column, ((IFacade) columnFacade).getTarget());
Assert.assertFalse(iterator.hasNext());
}
use of org.jboss.tools.hibernate.runtime.spi.IColumn in project jbosstools-hibernate by jbosstools.
the class FacadeFactoryTest method testCreateColumn.
@Test
public void testCreateColumn() {
Column column = new Column();
IColumn facade = facadeFactory.createColumn(column);
Assert.assertSame(column, ((IFacade) facade).getTarget());
}
use of org.jboss.tools.hibernate.runtime.spi.IColumn in project jbosstools-hibernate by jbosstools.
the class ServiceImplTest method testNewColumn.
@Test
public void testNewColumn() {
IColumn column = service.newColumn("foo");
Assert.assertNotNull(column);
Object target = ((IFacade) column).getTarget();
Assert.assertNotNull(target);
Assert.assertTrue(target instanceof Column);
Assert.assertEquals("foo", ((Column) target).getName());
}
use of org.jboss.tools.hibernate.runtime.spi.IColumn in project jbosstools-hibernate by jbosstools.
the class ForeignKeyFacadeTest method testContainsColumn.
@Test
public void testContainsColumn() {
Column column = new Column();
IColumn columnFacade = FACADE_FACTORY.createColumn(column);
Assert.assertFalse(foreignKeyFacade.containsColumn(columnFacade));
Assert.assertEquals("containsColumn", methodName);
Assert.assertArrayEquals(new Object[] { column }, arguments);
foreignKey.addColumn(column);
reset();
Assert.assertTrue(foreignKeyFacade.containsColumn(columnFacade));
Assert.assertEquals("containsColumn", methodName);
Assert.assertArrayEquals(new Object[] { column }, arguments);
}
Aggregations