77import java .io .IOException ;
88
99import org .baeldung .jackson .dtos .MyDto ;
10- import org .baeldung .jackson .dtos .MyDtoIgnoreUnkown ;
10+ import org .baeldung .jackson .dtos .MyDtoIgnoreUnknown ;
1111import org .junit .Test ;
1212
1313import com .fasterxml .jackson .core .JsonFactory ;
@@ -48,7 +48,7 @@ public final void givenNotAllFieldsHaveValuesInJson_whenDeserializingAJsonToACla
4848 // tests - json with unknown fields
4949
5050 @ Test (expected = UnrecognizedPropertyException .class )
51- public final void givenJsonHasUnkownValues_whenDeserializingAJsonToAClass_thenExceptionIsThrown () throws JsonParseException , JsonMappingException , IOException {
51+ public final void givenJsonHasUnknownValues_whenDeserializingAJsonToAClass_thenExceptionIsThrown () throws JsonParseException , JsonMappingException , IOException {
5252 final String jsonAsString = "{\" stringValue\" :\" a\" ,\" intValue\" :1,\" booleanValue\" :true,\" stringValue2\" :\" something\" }" ;
5353 final ObjectMapper mapper = new ObjectMapper ();
5454
@@ -61,7 +61,7 @@ public final void givenJsonHasUnkownValues_whenDeserializingAJsonToAClass_thenEx
6161 }
6262
6363 @ Test
64- public final void givenJsonHasUnkownValuesButJacksonIsIgnoringUnkownFields_whenDeserializing_thenCorrect () throws JsonParseException , JsonMappingException , IOException {
64+ public final void givenJsonHasUnknownValuesButJacksonIsIgnoringUnknownFields_whenDeserializing_thenCorrect () throws JsonParseException , JsonMappingException , IOException {
6565 final String jsonAsString =// @formatter:off
6666 "{\" stringValue\" :\" a\" ," +
6767 "\" intValue\" :1," +
@@ -79,15 +79,15 @@ public final void givenJsonHasUnkownValuesButJacksonIsIgnoringUnkownFields_whenD
7979 }
8080
8181 @ Test
82- public final void givenJsonHasUnkownValuesButUnkownFieldsAreIgnoredOnClass_whenDeserializing_thenCorrect () throws JsonParseException , JsonMappingException , IOException {
82+ public final void givenJsonHasUnknownValuesButUnknownFieldsAreIgnoredOnClass_whenDeserializing_thenCorrect () throws JsonParseException , JsonMappingException , IOException {
8383 final String jsonAsString =// @formatter:off
8484 "{\" stringValue\" :\" a\" ," +
8585 "\" intValue\" :1," +
8686 "\" booleanValue\" :true," +
8787 "\" stringValue2\" :\" something\" }" ; // @formatter:on
8888 final ObjectMapper mapper = new ObjectMapper ();
8989
90- final MyDtoIgnoreUnkown readValue = mapper .readValue (jsonAsString , MyDtoIgnoreUnkown .class );
90+ final MyDtoIgnoreUnknown readValue = mapper .readValue (jsonAsString , MyDtoIgnoreUnknown .class );
9191
9292 assertNotNull (readValue );
9393 assertThat (readValue .getStringValue (), equalTo ("a" ));
0 commit comments