Cleaned up API to match bld operations aand options APIs

This commit is contained in:
Erik C. Thauvin 2024-08-28 14:47:14 -07:00
parent 15034b4363
commit 2600e74be7
Signed by: erik
GPG key ID: 776702A6A2DA330E
5 changed files with 41 additions and 8 deletions

View file

@ -84,4 +84,18 @@ class PropertyFileOperationTest {
var op = new PropertyFileOperation();
assertThatCode(op::execute).isInstanceOf(ExitStatusException.class);
}
@Test
void testFile() {
var foo = new File("foo");
var op = new PropertyFileOperation().file("foo");
assertThat(op.file()).as("as string").isEqualTo(foo);
op = new PropertyFileOperation().file(foo);
assertThat(op.file()).as("as file").isEqualTo(foo);
op = new PropertyFileOperation().file(foo.toPath());
assertThat(op.file()).as("as path").isEqualTo(foo);
}
}