Examples of FileCollection


Examples of org.gradle.api.file.FileCollection

    }

    void setUpMocksAndAttributes(GroovyCompile compile, final boolean groovyClasspathEmpty) {
        super.setUpMocksAndAttributes(compile);

        final FileCollection groovyClasspathCollection = context.mock(FileCollection.class);
        context.checking(new Expectations(){{
            allowing(groovyClasspathCollection).isEmpty();
            will(returnValue(groovyClasspathEmpty));
        }});
View Full Code Here

Examples of org.gradle.api.file.FileCollection

        }});

        configuration.getArtifacts().add(artifact);
        configuration.setExtendsFrom(toSet(otherConfiguration));

        FileCollection files = configuration.getAllArtifacts().getFiles();
        assertThat(files.getFiles(), equalTo(toSet(artifactFile1, artifactFile2)));
        assertThat(files.getBuildDependencies().getDependencies(null), equalTo((Set) toSet(otherConfTaskMock, artifactTaskMock)));
    }
View Full Code Here

Examples of org.gradle.api.file.FileCollection

        ((CompositeFileTree) fileTree).getSourceCollections();
    }

    @Test
    public void filterDelegatesToEachSet() {
        final FileCollection filtered1 = context.mock(FileCollection.class);
        final FileCollection filtered2 = context.mock(FileCollection.class);
        @SuppressWarnings("unchecked")
        final Spec<File> spec = context.mock(Spec.class);

        FileCollection filtered = collection.filter(spec);
        assertThat(filtered, instanceOf(CompositeFileCollection.class));

        context.checking(new Expectations() {{
            one(source1).filter(spec);
            will(returnValue(filtered1));
View Full Code Here

Examples of org.gradle.api.file.FileCollection

    public void dependsOnLiveUnionOfAllDependencies() {
        final Task target = context.mock(Task.class, "target");
        final Task task1 = context.mock(Task.class, "task1");
        final Task task2 = context.mock(Task.class, "task2");
        final Task task3 = context.mock(Task.class, "task3");
        final FileCollection source3 = context.mock(FileCollection.class, "source3");

        context.checking(new Expectations(){{
            TaskDependency dependency1 = context.mock(TaskDependency.class, "dep1");
            TaskDependency dependency2 = context.mock(TaskDependency.class, "dep2");
            TaskDependency dependency3 = context.mock(TaskDependency.class, "dep3");
View Full Code Here

Examples of org.gradle.api.file.FileCollection

    @Test
    public void canUseAFileCollectionToSpecifyTheContentsOfTheCollection() {
        final File file1 = new File("1");
        final File file2 = new File("2");

        final FileCollection src = context.mock(FileCollection.class);

        collection.from(src);

        context.checking(new Expectations() {{
            one(src).getFiles();
View Full Code Here

Examples of org.gradle.api.file.FileCollection

    @Test
    public void resolveAddsEachSourceObjectAndBuildDependencies() {
        final FileCollectionResolveContext resolveContext = context.mock(FileCollectionResolveContext.class);
        final FileCollectionResolveContext nestedContext = context.mock(FileCollectionResolveContext.class);
        final FileCollection fileCollectionMock = context.mock(FileCollection.class);

        collection.from("file");
        collection.from(fileCollectionMock);

        context.checking(new Expectations() {{
View Full Code Here

Examples of org.gradle.api.file.FileCollection

    @Test
    public void resolveBuildDependenciesWhenNoEmpty() {
        final FileCollectionResolveContext resolveContext = context.mock(FileCollectionResolveContext.class);
        final FileCollectionResolveContext nestedContext = context.mock(FileCollectionResolveContext.class);
        final FileCollection fileCollectionMock = context.mock(FileCollection.class);

        collection.from("file");
        collection.builtBy("classes");
        collection.from(fileCollectionMock);
View Full Code Here

Examples of org.gradle.api.file.FileCollection

        assertThat(collection.getBuildDependencies().getDependencies(null), equalTo((Set) toSet(task)));
    }

    @Test
    public void taskDependenciesContainsUnionOfDependenciesOfNestedFileCollectionsPlusOwnDependencies() {
        final FileCollection fileCollectionMock = context.mock(FileCollection.class);

        collection.from(fileCollectionMock);
        collection.from("f");
        collection.builtBy("b");
View Full Code Here

Examples of org.jboss.profiler.filecollection.FileCollection

        File referencesData = new File(basicFileName + "_references_1.data");
        File invertedReferencesData = new File(basicFileName + "_references_2.data");
        File objectsDataFile = new File(basicFileName + "_objects.data");

        //File referencesIndex = File.createTempFile("references_1_",".indx",classesFile.getParentFile());
        references = new FileCollection(referencesData,null,MemoryReference.class,false,17);
        invertedReferences = new FileCollection(invertedReferencesData,null,MemoryReference.class,false,17);
        objects = new FileCollection(objectsDataFile,null,MemoryObject.class,false,24);

        treatClasses(classesFile);

        if (references.size()==0)
        {
View Full Code Here

Examples of org.jboss.profiler.filecollection.FileCollection

    /** a ReferenceContainer for the Object passed as parameter */
    public ReferenceContainer selectReferences(MemoryObject object, boolean forward) throws Exception
    {
        MemoryReference key = new MemoryReference();
        QuickSorter sorter = null;
        FileCollection collection = null;
        if (forward)
        {
            key.setReferee(object.getId());
            key.setReferred(-1);

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.