GroovyWorkspaceCompiler.of(targetDirectory, workspaceRoot, changedFilesDirectory); TreeParser parser = GroovyTreeParser.of(compiler, workspaceRoot,
private GroovyWorkspaceCompiler createGroovyWorkspaceCompiler() { return GroovyWorkspaceCompiler.of(output.getRoot().toPath(), root.getRoot().toPath(), changedOutput.getRoot().toPath()); }
@Before public void setup() throws IOException { workspaceRoot = tempFolder.newFolder(); Path changedOutput = tempFolder.newFolder().toPath(); Path target = tempFolder.newFolder().toPath(); uriSupplier = new WorkspaceUriSupplier(workspaceRoot.toPath(), changedOutput); parser = GroovyTreeParser.of(() -> { GroovyWorkspaceCompiler compiler = GroovyWorkspaceCompiler.of(target, workspaceRoot.toPath(), changedOutput); assertEquals(Sets.newHashSet(), compiler.compile(ImmutableSet.of())); return compiler.get(); }, workspaceRoot.toPath(), uriSupplier); }
@Test public void testChangedFilesRootNotFolder() throws IOException { expectedException.expect(IllegalArgumentException.class); expectedException.expectMessage("changedFilesRoot must be a directory"); GroovyWorkspaceCompiler.of(output.getRoot().toPath(), root.getRoot().toPath(), changedOutput.newFile().toPath()); }
@Test public void testWorkspaceRootNotFolder() throws IOException { expectedException.expect(IllegalArgumentException.class); expectedException.expectMessage("workspaceRoot must be a directory"); GroovyWorkspaceCompiler.of(output.getRoot().toPath(), root.newFile().toPath(), changedOutput.getRoot().toPath()); }
@Test public void testTargetDirectoryNotFolder() throws IOException { expectedException.expect(IllegalArgumentException.class); expectedException.expectMessage("targetDirectory must be a directory"); GroovyWorkspaceCompiler.of(output.newFile().toPath(), root.getRoot().toPath(), changedOutput.getRoot().toPath()); }