@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); }
@Before public void setUp() { super.setUp(); test = new Test(getProject(), AbstractTaskTest.TEST_TASK_NAME); ((AbstractProject) test.getProject()).setProjectDir(TEST_ROOT_DIR); context.checking( new Expectations() { { one(testFrameworkMock).initialize(getProject(), test); } }); test.useTestFramework(testFrameworkMock); if (!TEST_TEST_CLASSES_DIR.exists()) assertTrue(TEST_TEST_CLASSES_DIR.mkdirs()); }