* Test the column width info.
*/
public void testCurrentColumnWidthInfo() {
// getPercentageDifference
{
ColumnWidthInfo info = new ColumnWidthInfo(100, 300, 200, 150);
// getters
assertEquals(150, info.getCurrentWidth());
assertEquals(100, info.getMinimumWidth());
assertEquals(300, info.getMaximumWidth());
assertEquals(200, info.getPreferredWidth());
// percentage difference
info.setNewWidth(150);
assertEquals(-0.25, info.getPercentageDifference(), 0.001);
// required width
info.setRequiredWidth(40);
assertEquals(40, info.getRequiredWidth());
// new width
info.setNewWidth(190);
assertEquals(190, info.getNewWidth());
}
}