use of com.thoughtworks.go.config.NantTask in project gocd by gocd.
the class NantTaskBuilderTest method shouldUseAbsoluteNantPathIfAbsoluteNantPathIsSpecifiedOnWindows.
@Test
@EnabledOnOs(OS.WINDOWS)
void shouldUseAbsoluteNantPathIfAbsoluteNantPathIsSpecifiedOnWindows() {
NantTask nantTask = new NantTask();
nantTask.setNantPath("c:\\nantdir");
CommandBuilder builder = (CommandBuilder) nantTaskBuilder.createBuilder(builderFactory, nantTask, pipeline, resolver);
assertThat(new File(builder.getCommand())).isEqualTo(new File("c:\\nantdir\\nant"));
}
use of com.thoughtworks.go.config.NantTask in project gocd by gocd.
the class NantTaskBuilderTest method shouldSetNAntWorkingDirectoryAbsolutelyIfSpecified.
@Test
void shouldSetNAntWorkingDirectoryAbsolutelyIfSpecified() {
final File absoluteFile = new File("project").getAbsoluteFile();
NantTask task = new NantTask();
task.setWorkingDirectory(absoluteFile.getPath());
CommandBuilder builder = (CommandBuilder) nantTaskBuilder.createBuilder(builderFactory, task, pipeline, resolver);
assertThat(builder.getWorkingDir()).isEqualTo(absoluteFile);
}
use of com.thoughtworks.go.config.NantTask in project gocd by gocd.
the class NantTaskBuilderTest method shouldJoinNantPathWithWorkingDirectoryIfRelativeNantPathIsSpecified.
@Test
void shouldJoinNantPathWithWorkingDirectoryIfRelativeNantPathIsSpecified() {
NantTask nantTask = new NantTask();
nantTask.setNantPath("lib");
CommandBuilder builder = (CommandBuilder) nantTaskBuilder.createBuilder(builderFactory, nantTask, pipeline, resolver);
assertThat(new File(builder.getCommand())).isEqualTo(new File("lib/nant"));
}
Aggregations