@Test public void testSetenv() throws Throwable { String var = "TEST_RUN"; String val = "TEST-RUN-ENV-VALUE"; env.put(var, val); initProcess(commandFactory.env()); exec(); Integer exitCode = process.getExitCode(); assertNotNull("null exit code", exitCode); assertEquals(0, exitCode.intValue()); assertStringInOutput(val, getFinalOutput()); }
@Test public void testSetenv() throws Throwable { String var = "TEST_RUN"; String val = "TEST-RUN-ENV-VALUE"; env.put(var, val); initProcess(commandFactory.env()); exec(); Integer exitCode = process.getExitCode(); assertNotNull("null exit code", exitCode); assertEquals(0, exitCode.intValue()); assertStringInOutput(val, getFinalOutput()); }
@Test public void testSetenv() throws Throwable { String var = "TEST_RUN"; String val = "TEST-RUN-ENV-VALUE"; initProcess(commandFactory.env()); process.setEnv(var, val); process.start(); //in-thread wait process.run(); //here stopped assertTrue("process stop callback not received", stopped); assertEquals(0, process.getExitCode().intValue()); assertStringInOutput(val, getFinalOutput()); }
@Test public void testSetenv() throws Throwable { String var = "TEST_RUN"; String val = "TEST-RUN-ENV-VALUE"; initProcess(commandFactory.env()); process.setEnv(var, val); process.start(); //in-thread wait process.run(); //here stopped assertTrue("process stop callback not received", stopped); assertEquals(0, process.getExitCode().intValue()); assertStringInOutput(val, getFinalOutput()); }