@Before public void setUp() { testObj = createTask(GroovyCompile.class); groovyCompilerMock = context.mock(Compiler.class); testObj.setCompiler(groovyCompilerMock); GFileUtils.touch(new File(srcDir, "incl/file.groovy")); }
@Before public void setUp() { classesDir = tmpDir.createDir("classes"); File classfile = new File(classesDir, "FileTest.class"); GFileUtils.touch(classfile); resultsDir = tmpDir.createDir("testResults"); binResultsDir = tmpDir.createDir("binResults"); reportDir = tmpDir.createDir("report"); test = createTask(Test.class); }
@Before public void setUp() { super.setUp(); File rootDir = getProject().getProjectDir(); classesDir = new File(rootDir, "testClassesDir"); File classfile = new File(classesDir, "FileTest.class"); GFileUtils.touch(classfile); resultsDir = new File(rootDir, "resultDir"); reportDir = new File(rootDir, "report/tests"); test = createTask(Test.class); }
protected LocallyAvailableResource doAdd( File destination, String failureDescription, Action<File> action) { try { GFileUtils.parentMkdirs(destination); File inProgressMarkerFile = getInProgressMarkerFile(destination); GFileUtils.touch(inProgressMarkerFile); try { deleteAction.delete(destination); action.execute(destination); } catch (Throwable t) { deleteAction.delete(destination); throw t; } finally { deleteAction.delete(inProgressMarkerFile); } } catch (Throwable t) { throw new GradleException(failureDescription, t); } return entryAt(destination); }