Optimize and refactor (#2302)

This commit is contained in:
Grzegorz Piwowarek
2017-07-21 13:37:49 +03:00
committed by GitHub
parent 4e95722017
commit f8bf4038f1
32 changed files with 220 additions and 270 deletions
@@ -21,10 +21,10 @@ public class JsonCreatorUnitTest {
// arrange
String authorJson =
"{" +
" \"christianName\": \"Alex\"," +
" \"surname\": \"Theedom\"" +
"}";
"{" +
" \"christianName\": \"Alex\"," +
" \"surname\": \"Theedom\"" +
"}";
// act
final Author author = new ObjectMapper().readerFor(Author.class).readValue(authorJson);
@@ -24,7 +24,7 @@ public class JsonFilterUnitTest {
// arrange
Author author = new Author("Alex", "Theedom");
FilterProvider filters = new SimpleFilterProvider()
.addFilter("authorFilter", SimpleBeanPropertyFilter.filterOutAllExcept("lastName"));
.addFilter("authorFilter", SimpleBeanPropertyFilter.filterOutAllExcept("lastName"));
// act
String result = new ObjectMapper().writer(filters).writeValueAsString(author);
@@ -32,8 +32,8 @@ public class JsonFormatUnitTest {
Date date = df.parse(toParse);
Book book = new Book(
"Design Patterns: Elements of Reusable Object-oriented Software",
new Author("The", "GoF")
"Design Patterns: Elements of Reusable Object-oriented Software",
new Author("The", "GoF")
);
book.setPublished(date);
@@ -22,8 +22,8 @@ public class JsonPropertyUnitTest {
// arrange
Book book = new Book(
"Design Patterns: Elements of Reusable Object-oriented Software",
new Author("The", "GoF")
"Design Patterns: Elements of Reusable Object-oriented Software",
new Author("The", "GoF")
);
book.configureBinding("Hardback");