Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for addToUnion (0.1 sec)

  1. platforms/core-configuration/file-collections/src/test/groovy/org/gradle/api/internal/file/UnionFileTreeTest.groovy

        }
    
        def canAddFileTree() {
            FileTreeInternal set1 = Mock(FileTreeInternal)
            when:
            set.addToUnion(set1)
    
            then:
            set.sourceCollections == [set1]
        }
    
        def cannotAddFileCollection() {
            when:
            set.addToUnion(Mock(FileCollection))
    
            then:
            def e = thrown(UnsupportedOperationException)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  2. platforms/core-configuration/file-collections/src/main/java/org/gradle/api/internal/file/UnionFileTree.java

        protected void visitChildren(Consumer<FileCollectionInternal> visitor) {
            for (FileTreeInternal sourceTree : sourceTrees) {
                visitor.accept(sourceTree);
            }
        }
    
        public void addToUnion(FileCollection source) {
            if (!(source instanceof FileTree)) {
                throw new UnsupportedOperationException(String.format("Can only add FileTree instances to %s.", getDisplayName()));
            }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 2.4K bytes
    - Viewed (0)
Back to top