3233343536373839404142
{ assert value != null; ValueEncoder encoder = valueEncoderSource.getValueEncoder(value.getClass()); return encoder.toClient(value); } public <T> T toValue(Class<T> requiredType, String clientValue) {
5455565758596061626364
replay(); ValueEncoder ve = coercion.coerce(pke); assertEquals(ve.toClient(value), "99"); assertEquals(ve.toValue("99"), value); verify(); }
5152535455565758
final ValueEncoder encoder = this.valueEncoderSource.getValueEncoder(propertyAdapter .getType()); final Object label = propertyAdapter.get(object); return encoder.toClient(label); } }
{ Defense.notNull(value, "value"); ValueEncoder encoder = valueEncoderSource.getValueEncoder(value.getClass()); return encoder.toClient(value); } public <T> T toValue(Class<T> requiredType, String clientValue) {
394395396397398399400401402
BigDecimal big = new BigDecimal("-123456.797956563434"); assertEquals(f.parse("*123_456#797956563434"), big); assertEquals(f.toClient(big), "*123456#797956563434"); } }
283284285286287288289290291292
377378379380381382383384385386387
BigInteger big = new BigInteger("-123456"); assertEquals(f.parse("*123_456"), big); assertEquals(f.toClient(big), "*123456"); } @Test public void bigdecimal_with_localized_symbols() throws ParseException {
266267268269270271272273274275276
3738394041424344454647
replay(); ContextValueEncoder cve = new ContextValueEncoderImpl(source); assertSame(cve.toClient(value), encoded); verify(); }