Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
40bc785
commit 3146384
Showing
3 changed files
with
69 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
...lackbird/deser/TestSimpleDeserialize.java → ...blackbird/deser/BasicDeserializeTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...src/test/java/com/fasterxml/jackson/module/blackbird/failing/BasicDeserialize123Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.fasterxml.jackson.module.blackbird.failing; | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
|
||
import com.fasterxml.jackson.module.blackbird.BlackbirdTestBase; | ||
|
||
// Failing test from "BasicDeserializeTest", see [modules-base#123] | ||
public class BasicDeserialize123Test extends BlackbirdTestBase | ||
{ | ||
// [modules-base#123]: fluent method(s) | ||
static class Model123 { | ||
int value = 10; | ||
|
||
protected Model123() { } | ||
public Model123(int v) { value = v; } | ||
|
||
public int getValue() { | ||
return value; | ||
} | ||
|
||
public Model123 setValue(int value) { | ||
this.value = value; | ||
return this; | ||
} | ||
} | ||
|
||
private final ObjectMapper MAPPER = newObjectMapper(); | ||
|
||
// [modules-base#123] | ||
public void testFluentMethod() throws Exception | ||
{ | ||
String json = MAPPER.writeValueAsString(new Model123(28)); | ||
|
||
Model123 result = MAPPER.readValue(json, Model123.class); | ||
assertNotNull(result); | ||
assertEquals(28, result.value); | ||
} | ||
} |