Skip to content

Commit

Permalink
feat(objectionary#1417): forProgram -> withProgram
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Nov 22, 2022
1 parent cf6c2d7 commit 5d7a452
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public FakeMaven(final Path workspace) {
* @return Workspace with eo program.
* @throws IOException If can't save eo program in workspace.
*/
public FakeMaven forProgram(final String... program) throws IOException {
public FakeMaven withProgram(final String... program) throws IOException {
final Path path = Paths.get(FakeMaven.PROGRAM_PATH);
this.workspace.save(String.join("\n", program), path);
this.prog = path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ final class ParseMojoTest {
@Test
void testSimpleParsing(@TempDir final Path temp) throws Exception {
final FakeMaven maven = new FakeMaven(temp);
maven.forProgram("+package f", "[args] > main", " (stdout \"Hello!\").print")
maven.withProgram("+package f", "[args] > main", " (stdout \"Hello!\").print")
.withDefaults()
.withEoForeign()
.execute(ParseMojo.class);
Expand Down Expand Up @@ -82,7 +82,7 @@ void testSimpleParsingCached(@TempDir final Path temp) throws Exception {
maven.targetPath(),
cache.resolve(ParseMojo.PARSED)
).save("foo.x.main", "xmir", () -> expected);
maven.forProgram("invalid content")
maven.withProgram("invalid content")
.withTojoAttribute(AssembleMojo.ATTR_HASH, hash)
.withDefaults()
.withEoForeign()
Expand Down

0 comments on commit 5d7a452

Please sign in to comment.