@Before public void setUp() { super.setUp(); task = createTask(TestCopyTask.class); task.action = context.mock(CopyActionImpl.class); task.defaultSource = context.mock(FileCollection.class); }
@Before public void setUp() { super.setUp(); projectDependencyMock = context.mock(DefaultProjectDependency.class); testProject = HelperUtil.createRootProject(new File("dependent")); context.checking( new Expectations() { { allowing(projectDependencyMock).getDependencyProject(); will(returnValue(testProject)); } }); eclipseWtp = createTask(EclipseWtp.class); }
@Before public void setUp() { super.setUp(); context.setImposteriser(ClassImposteriser.INSTANCE); wrapper = createTask(Wrapper.class); wrapperScriptGeneratorMock = context.mock(WrapperScriptGenerator.class); wrapper.setScriptDestinationPath("scriptDestination"); wrapper.setGradleVersion("1.0"); targetWrapperJarPath = "jarPath"; expectedTargetWrapperJar = new TestFile( getProject().getProjectDir(), targetWrapperJarPath + "/" + Wrapper.WRAPPER_JAR); expectedTargetWrapperProperties = new File( getProject().getProjectDir(), targetWrapperJarPath + "/" + Wrapper.WRAPPER_PROPERTIES); new File(getProject().getProjectDir(), targetWrapperJarPath).mkdirs(); distributionPath = "somepath"; wrapper.setJarPath(targetWrapperJarPath); wrapper.setDistributionPath(distributionPath); wrapper.setUnixWrapperScriptGenerator(wrapperScriptGeneratorMock); }