Use a Collection instead of a List to hold the command and arguments

This commit is contained in:
Erik C. Thauvin 2024-06-21 00:08:04 -07:00
parent e601ffab91
commit 35287d7d6d
Signed by: erik
GPG key ID: 776702A6A2DA330E
2 changed files with 16 additions and 12 deletions

View file

@ -31,16 +31,10 @@ class ExecOperationTest {
private static final String FOO = "foo";
@Test
void testCat() throws Exception {
var tmpFile = new File("hello.tmp");
tmpFile.deleteOnExit();
new ExecOperation()
.fromProject(new Project())
.timeout(10)
.command("touch", tmpFile.getName())
.execute();
assertThat(tmpFile).exists();
void testCommand() {
var op = new ExecOperation().fromProject(new WebProject())
.command(FOO, "bar");
assertThat(op.command()).isEqualTo(List.of(FOO, "bar"));
}
@Test