@Before
  public void setUp() {
    testObj = createTask(GroovyCompile.class);
    groovyCompilerMock = context.mock(Compiler.class);
    testObj.setCompiler(groovyCompilerMock);

    GFileUtils.touch(new File(srcDir, "incl/file.groovy"));
  }
Beispiel #2
0
  @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);
  }
Beispiel #3
0
  @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);
  }
Beispiel #4
0
 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);
 }