minor cleanup work

This commit is contained in:
eugenp 2014-01-05 23:02:40 +02:00
parent a00ccc43ae
commit 52a6046e45
1 changed files with 3 additions and 1 deletions

View File

@ -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());