public BigDecimalConverter withRoundingMode(RoundingMode mode) { properties.put(BigDecimalConverter.ROUNDING_MODE, mode.toString()); return this; }
"roundingMode=" + roundingMode.toString();
"roundingMode=" + roundingMode.toString();
"roundingMode=" + roundingMode.toString();
@Override public String toString() { return this.getClass().getSimpleName() + " " + myMathContext.getPrecision() + ":" + myScale + " " + myMathContext.getRoundingMode().toString(); }
@Override public String toString() { return this.getClass().getSimpleName() + " " + myMathContext.getPrecision() + ":" + myScale + " " + myMathContext.getRoundingMode().toString(); }
@Test public void choice() throws Exception { prepareConfig(RoundingMode.CEILING.toString()); assertEquals(RoundingMode.CEILING, this.config .getChoice(XenonConfigurationTest.class, this.foundProperty, RoundingMode.class, RoundingMode.HALF_UP)); assertEquals(RoundingMode.FLOOR, this.config .getChoice(XenonConfigurationTest.class, this.undefined, RoundingMode.class, RoundingMode.FLOOR)); prepareConfig("random junk"); assertEquals(RoundingMode.UP, this.config .getChoice(XenonConfigurationTest.class, this.foundProperty, RoundingMode.class, RoundingMode.UP)); }
@Test public void choice() throws Exception { prepareConfig(RoundingMode.CEILING.toString()); assertEquals(RoundingMode.CEILING, this.config .getChoice(XenonConfigurationTest.class, this.foundProperty, RoundingMode.class, RoundingMode.HALF_UP)); assertEquals(RoundingMode.FLOOR, this.config .getChoice(XenonConfigurationTest.class, this.undefined, RoundingMode.class, RoundingMode.FLOOR)); prepareConfig("random junk"); assertEquals(RoundingMode.UP, this.config .getChoice(XenonConfigurationTest.class, this.foundProperty, RoundingMode.class, RoundingMode.UP)); }