use of org.gradle.api.internal.file.collections.MinimalFileSet in project gradle by gradle.
the class CompositeFileCollectionTest method fileTreeIsLive.
@Test
public void fileTreeIsLive() {
final File dir1 = new File("dir1");
final File dir2 = new File("dir1");
final File dir3 = new File("dir1");
final MinimalFileSet source3 = context.mock(MinimalFileSet.class);
FileTree fileTree = collection.getAsFileTree();
assertThat(fileTree, instanceOf(CompositeFileTree.class));
context.checking(new Expectations() {
{
oneOf(source1).getFiles();
will(returnValue(toSet(dir1)));
oneOf(source2).getFiles();
will(returnValue(toSet(dir2)));
}
});
((CompositeFileTree) fileTree).getSourceCollections();
collection.sourceCollections.add(source3);
context.checking(new Expectations() {
{
oneOf(source1).getFiles();
will(returnValue(toSet(dir1)));
oneOf(source2).getFiles();
will(returnValue(toSet(dir2)));
oneOf(source3).getFiles();
will(returnValue(toSet(dir3)));
}
});
((CompositeFileTree) fileTree).getSourceCollections();
}
Aggregations