jackson work
This commit is contained in:
parent
b5ed631612
commit
a9c3c08670
@ -22,7 +22,7 @@ public class MyDtoSetter {
|
|||||||
this.intValue = intValue;
|
this.intValue = intValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int anotherGetIntValue() {
|
public int alternativeGetIntValue() {
|
||||||
return intValue;
|
return intValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ public class JacksonFieldUnitTest {
|
|||||||
final MyDtoSetter dtoObject = mapper.readValue(jsonAsString, MyDtoSetter.class);
|
final MyDtoSetter dtoObject = mapper.readValue(jsonAsString, MyDtoSetter.class);
|
||||||
|
|
||||||
assertNotNull(dtoObject);
|
assertNotNull(dtoObject);
|
||||||
assertThat(dtoObject.anotherGetIntValue(), equalTo(1));
|
assertThat(dtoObject.alternativeGetIntValue(), equalTo(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -82,7 +82,6 @@ public class JacksonFieldUnitTest {
|
|||||||
@Test
|
@Test
|
||||||
public final void givenDifferentAccessLevels_whenSetVisibility_thenSerializable() throws IOException {
|
public final void givenDifferentAccessLevels_whenSetVisibility_thenSerializable() throws IOException {
|
||||||
final ObjectMapper mapper = new ObjectMapper();
|
final ObjectMapper mapper = new ObjectMapper();
|
||||||
mapper.setVisibility(PropertyAccessor.ALL, Visibility.NONE);
|
|
||||||
mapper.setVisibility(PropertyAccessor.FIELD, Visibility.ANY);
|
mapper.setVisibility(PropertyAccessor.FIELD, Visibility.ANY);
|
||||||
|
|
||||||
final MyDtoAccessLevel dtoObject = new MyDtoAccessLevel();
|
final MyDtoAccessLevel dtoObject = new MyDtoAccessLevel();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user