Search in sources :

Example 1 with AbstractBigDecimalField

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());
}
Also used : ITableRow(org.eclipse.scout.rt.client.ui.basic.table.ITableRow) AbstractBigDecimalField(org.eclipse.scout.rt.client.ui.form.fields.bigdecimalfield.AbstractBigDecimalField) Test(org.junit.Test)

Aggregations

ITableRow (org.eclipse.scout.rt.client.ui.basic.table.ITableRow)1 AbstractBigDecimalField (org.eclipse.scout.rt.client.ui.form.fields.bigdecimalfield.AbstractBigDecimalField)1 Test (org.junit.Test)1