XcodeBuilder extends Builder implements Script { public Commandline buildCommandline() throws CruiseControlException { Commandline cmdLine = new Commandline(); cmdLine.setWorkingDir(directory); cmdLine.setExecutable("xcodebuild"); arguments.addArguments(cmdLine, buildProperties); return cmdLine; }  @Override Element build(Map<String, String> properties, Progress progressIn); @Override Element buildWithTarget(Map<String, String> properties, String target, Progress progress); @Override void validate(); Commandline buildCommandline(); int getExitCode(); void setExitCode(int result); void setDirectory(String path); Element getElementFromLine(String line); void setTimeout(long timeout); @Description("Pass specified argument to xcodebuild. The element has the required attribute: value.") Arg createArg();  }
@Test public void executableShouldBeXcodebuild() throws CruiseControlException { Commandline cmdLine = builder.buildCommandline(); assertEquals("xcodebuild", cmdLine.getExecutable()); }
@Test public void shouldBeNoDefaultArguments() throws CruiseControlException { Commandline cmdLine = builder.buildCommandline(); assertArrayEquals(new String[] {}, cmdLine.getArguments()); }