Skip to content

Commit

Permalink
#83 test refactoring: improve variable names and error message
Browse files Browse the repository at this point in the history
  • Loading branch information
remkop committed Dec 19, 2017
1 parent 50c9ba9 commit a87159e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test/java/picocli/CommandLineTypeConversionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -664,11 +664,11 @@ public void testJava8Types() throws Exception {
verifyReflectedConverter(registry, "java.time.ZoneOffset", "+0800", "+08:00");
}

private void verifyReflectedConverter(Map<Class<?>, ITypeConverter<?>> registry, String cls, String value, String expectedToString) throws Exception {
Class<?> pathClass = Class.forName(cls);
ITypeConverter<?> converter = registry.get(pathClass);
private void verifyReflectedConverter(Map<Class<?>, ITypeConverter<?>> registry, String clsName, String value, String expectedToString) throws Exception {
Class<?> cls = Class.forName(clsName);
ITypeConverter<?> converter = registry.get(cls);
Object path = converter.convert(value);
assertTrue("java.nio.file.Path", pathClass.isAssignableFrom(path.getClass()));
assertTrue(clsName, cls.isAssignableFrom(path.getClass()));
assertEquals(expectedToString, path.toString());
}

Expand Down

0 comments on commit a87159e

Please sign in to comment.