use of org.eclipse.scout.rt.ui.html.json.table.fixtures.TableWithBooleanColumn in project scout.rt by eclipse.
the class JsonCellToJsonTest method testBooleanColumn.
@Test
public void testBooleanColumn() throws JSONException {
TableWithBooleanColumn table = new TableWithBooleanColumn();
table.initTable();
ITableRow row = table.addRow(table.createRow());
table.getColumn().setValue(row, true);
JsonTable<ITable> jsonTable = UiSessionTestUtility.newJsonAdapter(m_uiSession, table, null);
JSONObject jsonObj = (JSONObject) jsonTable.cellToJson(row, table.getColumn());
Assert.assertEquals(true, jsonObj.get("value"));
table.getColumn().setValue(row, false);
jsonObj = (JSONObject) jsonTable.cellToJson(row, table.getColumn());
Assert.assertEquals(false, jsonObj.get("value"));
}
Aggregations