1 37 package net.sourceforge.cruisecontrol.builders; 38 39 import junit.framework.TestCase; 40 import net.sourceforge.cruisecontrol.CruiseControlException; 41 import net.sourceforge.cruisecontrol.testutil.TestUtil; 42 43 public class ExecScriptTest extends TestCase { 44 45 private String testExecCmd = "dir"; 46 private String testExecArgs = "C:\\temp"; 47 private ExecScript script; 48 49 52 public ExecScriptTest(String name) { 53 super(name); 54 } 55 56 59 protected void setUp() throws Exception { 60 script = new ExecScript(); 61 script.setExecCommand(testExecCmd); 62 script.setErrorStr("error in compilation"); 64 } 66 69 public void testGetCommandLineArgs() throws CruiseControlException { 70 String [] simpleCmd = { testExecCmd }; 71 TestUtil.assertArray("simpleCmd", simpleCmd, 72 script.buildCommandline().getCommandline()); 73 74 script.setExecArgs(testExecArgs); 75 String [] detailedCmd = { testExecCmd, testExecArgs }; 76 TestUtil.assertArray("detailedCmd", detailedCmd, 77 script.buildCommandline().getCommandline()); 78 } 80 } | Popular Tags |