Search in sources :

Example 1 with TaskCollection

use of org.gradle.api.tasks.TaskCollection in project core-java by SpineEventEngine.

the class ModelVerifierShould method setUp.

@Before
public void setUp() {
    project = mock(Project.class);
    when(project.getSubprojects()).thenReturn(Collections.<Project>emptySet());
    when(project.getRootProject()).thenReturn(project);
    final TaskContainer tasks = mock(TaskContainer.class);
    final TaskCollection emptyTaskCollection = mock(TaskCollection.class);
    when(emptyTaskCollection.iterator()).thenReturn(Iterators.emptyIterator());
    when(emptyTaskCollection.toArray()).thenReturn(EMPTY_ARRAY);
    when(tasks.withType(any(Class.class))).thenReturn(emptyTaskCollection);
    when(project.getTasks()).thenReturn(tasks);
}
Also used : Project(org.gradle.api.Project) TaskContainer(org.gradle.api.tasks.TaskContainer) TaskCollection(org.gradle.api.tasks.TaskCollection) Before(org.junit.Before)

Aggregations

Project (org.gradle.api.Project)1 TaskCollection (org.gradle.api.tasks.TaskCollection)1 TaskContainer (org.gradle.api.tasks.TaskContainer)1 Before (org.junit.Before)1