use of org.gradle.api.execution.TaskExecutionListener in project gradle by gradle.
the class DefaultTaskGraphExecuterTest method setUp.
@Before
public void setUp() {
root = TestUtil.create(temporaryFolder).rootProject();
final InternalTaskExecutionListener taskExecutionListener = context.mock(InternalTaskExecutionListener.class);
context.checking(new Expectations() {
{
one(listenerManager).createAnonymousBroadcaster(TaskExecutionGraphListener.class);
will(returnValue(new ListenerBroadcast<TaskExecutionGraphListener>(TaskExecutionGraphListener.class)));
one(listenerManager).createAnonymousBroadcaster(TaskExecutionListener.class);
will(returnValue(new ListenerBroadcast<TaskExecutionListener>(TaskExecutionListener.class)));
allowing(cancellationToken).isCancellationRequested();
one(listenerManager).getBroadcaster(InternalTaskExecutionListener.class);
will(returnValue(taskExecutionListener));
ignoring(taskExecutionListener);
}
});
taskExecuter = new DefaultTaskGraphExecuter(listenerManager, new DefaultTaskPlanExecutor(new DefaultBuildOperationWorkerRegistry(1)), Factories.constant(executer), cancellationToken, buildOperationExecutor);
}
Aggregations