Search in sources :

Example 1 with Argument

use of com.thoughtworks.go.config.Argument in project gocd by gocd.

the class ExecTaskTest method shouldSupportMultipleArgs.

@Test
public void shouldSupportMultipleArgs() throws Exception {
    String xml = "<exec command='ls'>\n" + "  <arg>arg1</arg>\n" + "  <arg>arg2</arg>\n" + "</exec>";
    ExecTask execTask = new MagicalGoConfigXmlLoader(new ConfigCache(), ConfigElementImplementationRegistryMother.withNoPlugins()).fromXmlPartial(xml, ExecTask.class);
    assertThat(execTask.getArgList(), is(new Arguments(new Argument("arg1"), new Argument("arg2"))));
}
Also used : ConfigCache(com.thoughtworks.go.config.ConfigCache) Argument(com.thoughtworks.go.config.Argument) ExecTask(com.thoughtworks.go.config.ExecTask) Arguments(com.thoughtworks.go.domain.config.Arguments) MagicalGoConfigXmlLoader(com.thoughtworks.go.config.MagicalGoConfigXmlLoader) Matchers.containsString(org.hamcrest.Matchers.containsString) Test(org.junit.jupiter.api.Test)

Aggregations

Argument (com.thoughtworks.go.config.Argument)1 ConfigCache (com.thoughtworks.go.config.ConfigCache)1 ExecTask (com.thoughtworks.go.config.ExecTask)1 MagicalGoConfigXmlLoader (com.thoughtworks.go.config.MagicalGoConfigXmlLoader)1 Arguments (com.thoughtworks.go.domain.config.Arguments)1 Matchers.containsString (org.hamcrest.Matchers.containsString)1 Test (org.junit.jupiter.api.Test)1