use of org.eclipse.scout.rt.client.ui.dnd.JavaTransferObject in project scout.rt by eclipse.
the class OrganizeColumnsFormTest method testNoNPEInExecDrop.
@Test
public void testNoNPEInExecDrop() {
ITable table = mock(ITable.class);
List<ITableRow> list = new LinkedList<ITableRow>();
list.add(mock(ITableRow.class));
JavaTransferObject transfer = mock(JavaTransferObject.class);
when(transfer.getLocalObjectAsList(ITableRow.class)).thenReturn(list);
OrganizeColumnsForm form = new OrganizeColumnsForm(table);
try {
form.getColumnsTableField().getTable().execDrop(null, null);
form.getColumnsTableField().getTable().execDrop(null, transfer);
form.getColumnsTableField().getTable().execDrop(mock(ITableRow.class), null);
} catch (NullPointerException e) {
fail("Null-Argument should not lead to NullPointerException " + e);
}
}
Aggregations