Skip to content

Commit a9c3c08

Browse files
author
eugenp
committed
jackson work
1 parent b5ed631 commit a9c3c08

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

jackson/src/test/java/org/baeldung/jackson/field/MyDtoSetter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public void setIntValue(final int intValue) {
2222
this.intValue = intValue;
2323
}
2424

25-
public int anotherGetIntValue() {
25+
public int alternativeGetIntValue() {
2626
return intValue;
2727
}
2828

jackson/src/test/java/org/baeldung/jackson/test/JacksonFieldUnitTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public final void givenDifferentAccessLevels_whenSetterAdded_thenDeserializable(
6565
final MyDtoSetter dtoObject = mapper.readValue(jsonAsString, MyDtoSetter.class);
6666

6767
assertNotNull(dtoObject);
68-
assertThat(dtoObject.anotherGetIntValue(), equalTo(1));
68+
assertThat(dtoObject.alternativeGetIntValue(), equalTo(1));
6969
}
7070

7171
@Test
@@ -82,7 +82,6 @@ public final void givenDifferentAccessLevels_whenSetterAdded_thenStillNotSeriali
8282
@Test
8383
public final void givenDifferentAccessLevels_whenSetVisibility_thenSerializable() throws IOException {
8484
final ObjectMapper mapper = new ObjectMapper();
85-
mapper.setVisibility(PropertyAccessor.ALL, Visibility.NONE);
8685
mapper.setVisibility(PropertyAccessor.FIELD, Visibility.ANY);
8786

8887
final MyDtoAccessLevel dtoObject = new MyDtoAccessLevel();

0 commit comments

Comments
 (0)