diff options
Diffstat (limited to 'src/test/java/com/fasterxml/jackson/databind/deser/creators/TestCreators.java')
-rw-r--r-- | src/test/java/com/fasterxml/jackson/databind/deser/creators/TestCreators.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/java/com/fasterxml/jackson/databind/deser/creators/TestCreators.java b/src/test/java/com/fasterxml/jackson/databind/deser/creators/TestCreators.java index 5b6247855..7c8e389d8 100644 --- a/src/test/java/com/fasterxml/jackson/databind/deser/creators/TestCreators.java +++ b/src/test/java/com/fasterxml/jackson/databind/deser/creators/TestCreators.java @@ -1,5 +1,7 @@ package com.fasterxml.jackson.databind.deser.creators; +import java.math.BigDecimal; +import java.math.BigInteger; import java.util.*; import com.fasterxml.jackson.annotation.*; @@ -329,6 +331,18 @@ public class TestCreators assertTrue(bean2.b); } + public void testSimpleBigIntegerConstructor() throws Exception + { + final BigIntegerWrapper result = MAPPER.readValue("17", BigIntegerWrapper.class); + assertEquals(new BigInteger("17"), result.i); + } + + public void testSimpleBigDecimalConstructor() throws Exception + { + final BigDecimalWrapper result = MAPPER.readValue("42.5", BigDecimalWrapper.class); + assertEquals(new BigDecimal("42.5"), result.d); + } + public void testSimpleFactory() throws Exception { FactoryBean bean = MAPPER.readValue("{ \"f\" : 0.25 }", FactoryBean.class); |