Skip to content

Commit

Permalink
minor test refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Oct 20, 2016
1 parent 1a9058f commit 7b24dfb
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 46 deletions.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ protected DeserializationConfig(DeserializationConfig src, SimpleMixInResolver m
/* Life-cycle, factory methods from MapperConfig /* Life-cycle, factory methods from MapperConfig
/********************************************************** /**********************************************************
*/ */

@Override @Override
public DeserializationConfig with(MapperFeature... features) public DeserializationConfig with(MapperFeature... features)
{ {
Expand Down
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.fasterxml.jackson.databind.deser;

import com.fasterxml.jackson.databind.*;

/**
* Tests to make sure that the new "merging" property of
* <code>JsonSetter</code> annotation works as expected.
*
* @since 2.9
*/
public class PropertyMergeTest extends BaseMapTest
{
public void testFoo() { }
}

This file was deleted.

Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class TestBeanDeserializer extends BaseMapTest public class TestBeanDeserializer extends BaseMapTest
{ {
/* static abstract class Abstract {
/********************************************************** public int x;
/* Helper types }
/**********************************************************
*/


static class Bean { static class Bean {
public String b = "b"; public String b = "b";
Expand Down Expand Up @@ -242,6 +240,20 @@ public String deserialize(JsonParser p, DeserializationContext ctxt)


private final ObjectMapper MAPPER = new ObjectMapper(); private final ObjectMapper MAPPER = new ObjectMapper();


/**
* Test to verify details of how trying to deserialize into
* abstract type should fail (if there is no way to determine
* actual type information for the concrete type to use)
*/
public void testAbstractFailure() throws Exception
{
try {
MAPPER.readValue("{ \"x\" : 3 }", Abstract.class);
fail("Should fail on trying to deserialize abstract type");
} catch (JsonProcessingException e) {
verifyException(e, "can not construct");
}
}
public void testPropertyRemoval() throws Exception public void testPropertyRemoval() throws Exception
{ {
ObjectMapper mapper = new ObjectMapper(); ObjectMapper mapper = new ObjectMapper();
Expand Down
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fasterxml.jackson.databind.deser; package com.fasterxml.jackson.databind.deser.jdk;


import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
Expand Down
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fasterxml.jackson.databind.deser; package com.fasterxml.jackson.databind.jsontype;


import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeInfo;
Expand Down

0 comments on commit 7b24dfb

Please sign in to comment.