minor cleanup work
This commit is contained in:
parent
a00ccc43ae
commit
52a6046e45
|
@ -40,7 +40,7 @@ public class JacksonSerializationUnitTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public final void givenNameOfFieldIsChanged_whenSerializing_thenCorrect() throws JsonParseException, IOException {
|
||||
public final void givenNameOfFieldIsChangedViaAnnotationOnGetter_whenSerializing_thenCorrect() throws JsonParseException, IOException {
|
||||
final ObjectMapper mapper = new ObjectMapper();
|
||||
final MyDtoFieldNameChanged dtoObject = new MyDtoFieldNameChanged();
|
||||
dtoObject.setStringValue("a");
|
||||
|
@ -52,6 +52,8 @@ public class JacksonSerializationUnitTest {
|
|||
System.out.println(dtoAsString);
|
||||
}
|
||||
|
||||
// tests - serialize via accessors/fields
|
||||
|
||||
@Test(expected = JsonMappingException.class)
|
||||
public final void givenObjectHasNoAccessors_whenSerializing_thenException() throws JsonParseException, IOException {
|
||||
final String dtoAsString = new ObjectMapper().writeValueAsString(new MyDtoNoAccessors());
|
||||
|
|
Loading…
Reference in New Issue