use of org.gradle.api.internal.file.collections.DefaultDirectoryFileTreeFactory in project gradle by gradle.
the class CompositeFileCollectionTest method getAsFileTreesReturnsUnionOfFileTrees.
@Test
public void getAsFileTreesReturnsUnionOfFileTrees() {
final DirectoryFileTreeFactory directoryFileTreeFactory = new DefaultDirectoryFileTreeFactory();
final DirectoryFileTree set1 = directoryFileTreeFactory.create(new File("dir1").getAbsoluteFile());
final DirectoryFileTree set2 = directoryFileTreeFactory.create(new File("dir2").getAbsoluteFile());
context.checking(new Expectations() {
{
oneOf(source1).getAsFileTrees();
will(returnValue(toList((Object) set1)));
oneOf(source2).getAsFileTrees();
will(returnValue(toList((Object) set2)));
}
});
assertThat(collection.getAsFileTrees(), equalTo((Collection) toList(set1, set2)));
}
Aggregations