Skip to content

Commit

Permalink
#113. Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Joński committed Oct 9, 2016
1 parent 266db39 commit 3407d05
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
2 changes: 0 additions & 2 deletions src/main/java/pl/pojo/tester/api/ConstructorTester.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ private List<Constructor<?>> getUserDefinedConstructors(final Class<?> testedCla
return Arrays.stream(testedClass.getDeclaredConstructors())
.filter(this::isNotSynthetic)
.collect(Collectors.toList());

}

private boolean isNotSynthetic(final Constructor<?> constructor) {
Expand Down Expand Up @@ -78,5 +77,4 @@ private Object[] createConstructorParameters(final Constructor<?> constructor) {
.toArray();
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ protected String getDetailedMessage() {
}

private String createArrayContentString(final Object[] array) {
if (array == null) {
return "<no parameters>";
}
return Arrays.stream(array)
.map(String::valueOf)
.collect(Collectors.joining(", ", "[ ", " ]"));
return array == null
? "<no parameters>"
: Arrays.stream(array)
.map(String::valueOf)
.collect(Collectors.joining(", ", "[ ", " ]"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ public BadConstructorPojo() {
throw new RuntimeException("test");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ public void Should_Return_Expected_Error_Prefix() throws NoSuchMethodException {
}

private static class Pojo {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ public ConstructorThrowingException() {
}
}

}
}

0 comments on commit 3407d05

Please sign in to comment.