Search in sources :

Example 26 with CommandBuilder

use of com.thoughtworks.go.domain.builder.CommandBuilder in project gocd by gocd.

the class NantTaskBuilderTest method shouldSetTargetWhenTargetIsSpecified.

@Test
public void shouldSetTargetWhenTargetIsSpecified() throws Exception {
    NantTask nantTask = new NantTask();
    nantTask.setTarget("unit-test");
    CommandBuilder commandBuilder = (CommandBuilder) nantTaskBuilder.createBuilder(builderFactory, nantTask, pipeline, resolver);
    assertThat(commandBuilder.getArgs(), is("unit-test"));
}
Also used : NantTask(com.thoughtworks.go.config.NantTask) CommandBuilder(com.thoughtworks.go.domain.builder.CommandBuilder) Test(org.junit.Test) TasksTest(com.thoughtworks.go.domain.TasksTest)

Aggregations

CommandBuilder (com.thoughtworks.go.domain.builder.CommandBuilder)26 Test (org.junit.Test)18 File (java.io.File)17 TasksTest (com.thoughtworks.go.domain.TasksTest)16 NantTask (com.thoughtworks.go.config.NantTask)9 Builder (com.thoughtworks.go.domain.builder.Builder)9 RunIf (com.googlecode.junit.ext.RunIf)6 BuildCause (com.thoughtworks.go.domain.buildcause.BuildCause)4 NullBuilder (com.thoughtworks.go.domain.builder.NullBuilder)4 ArtifactStores (com.thoughtworks.go.config.ArtifactStores)3 ArrayList (java.util.ArrayList)3 ExecTask (com.thoughtworks.go.config.ExecTask)2 RunIfConfigs (com.thoughtworks.go.domain.RunIfConfigs)2 StubBuilder (com.thoughtworks.go.domain.builder.StubBuilder)2 EnvironmentVariableContext (com.thoughtworks.go.util.command.EnvironmentVariableContext)2 AntTask (com.thoughtworks.go.config.AntTask)1 RakeTask (com.thoughtworks.go.config.RakeTask)1 Materials (com.thoughtworks.go.config.materials.Materials)1 StubGoPublisher (com.thoughtworks.go.domain.StubGoPublisher)1 CommandBuilderWithArgList (com.thoughtworks.go.domain.builder.CommandBuilderWithArgList)1