use of org.eclipse.scout.rt.client.ui.form.fields.bigdecimalfield.AbstractBigDecimalField in project scout.rt by eclipse.
the class AbstractDecimalColumnTest method testPrepareEditInternal.
@Test
public void testPrepareEditInternal() {
setGroupingUsed(false);
setMinFractionDigits(5);
setMaxFractionDigits(6);
setPercent(true);
setMultiplier(100);
setFractionDigits(3);
ITableRow row = Mockito.mock(ITableRow.class);
AbstractBigDecimalField field = (AbstractBigDecimalField) prepareEditInternal(row);
assertFalse("expected groupingUsed-property to be propagated to field", field.isGroupingUsed());
assertEquals("expected minFractionDigits-property to be propagated to field", 5, field.getMinFractionDigits());
assertEquals("expected maxFractionDigits-property to be propagated to field", 6, field.getMaxFractionDigits());
assertTrue("expected percent-property to be propagated to field", field.isPercent());
assertEquals("expected multiplier-property to be propagated to field", 100, field.getMultiplier());
assertEquals("expected fractionDigits-property to be propagated to field", 3, field.getFractionDigits());
}
Aggregations