garydgregory commented on code in PR #72:
URL: https://github.com/apache/commons-exec/pull/72#discussion_r1002467420
##########
src/test/java/org/apache/commons/exec/DefaultExecutorTest.java:
##########
@@ -118,13 +120,14 @@ public void testExecuteWithWorkingDirectory() throws
Exception {
assertEquals(exec.getWorkingDirectory(), workingDir);
}
- @Test(expected = IOException.class)
+ @Test
public void testExecuteWithInvalidWorkingDirectory() throws Exception {
final File workingDir = new File("/foo/bar");
final CommandLine cl = new CommandLine(testScript);
exec.setWorkingDirectory(workingDir);
- exec.execute(cl);
+ final Executable testMethod = () -> exec.execute(cl);
Review Comment:
Why do need local variables for Executables? I would inline these.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]