Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 236 for assertHasDescription (0.22 sec)

  1. subprojects/core/src/integTest/groovy/org/gradle/api/ExternalScriptErrorIntegrationTest.groovy

        def "produces reasonable error message when external script fails with Groovy exception"() {
            externalScript << '''
    
    doStuff()
    '''
            when:
            fails()
    
            then:
            failure.assertHasDescription('A problem occurred evaluating script.')
                    .assertHasCause('Could not find method doStuff() for arguments [] on root project')
                    .assertHasFileName("Script '${externalScript}'")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 05 19:36:14 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  2. subprojects/composite-builds/src/integTest/groovy/org/gradle/integtests/composite/CompositeBuildTaskDependencyIntegrationTest.groovy

            fails(buildA, ":delegate")
    
            then:
            failure.assertHasDescription("Could not determine the dependencies of task ':delegate'.")
            failure.assertHasCause("Task with path ':logP' not found in project ':buildB'.")
    
            when:
            fails(buildA, ":subDelegate")
    
            then:
            failure.assertHasDescription("Could not determine the dependencies of task ':subDelegate'.")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 24 06:54:47 UTC 2023
    - 9.1K bytes
    - Viewed (0)
  3. subprojects/core/src/integTest/groovy/org/gradle/groovy/scripts/StatementLabelsIntegrationTest.groovy

    version: '1.0'
            """
    
            expect:
            fails("tasks")
            failure.assertHasFileName("Build file '${buildFile}'")
            failure.assertHasLineNumber(2)
            failure.assertHasDescription("Could not compile build file '${buildFile}'.")
            failure.assertThatCause(CoreMatchers.containsString("build file '${buildFile}': 2: Statement labels may not be used in build scripts."))
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 21 07:18:30 UTC 2020
    - 3.1K bytes
    - Viewed (0)
  4. platforms/software/resources-s3/src/integTest/groovy/org/gradle/integtests/resource/s3/maven/MavenS3RepoErrorsIntegrationTest.groovy

            setup:
            buildFile << mavenAwsRepoDsl()
            when:
            module.pom.expectDownloadAuthenticationError()
            then:
            fails 'retrieve'
            and:
            failure.assertHasDescription("Execution failed for task ':retrieve'.")
            failure.assertHasCause("Could not resolve all files for configuration ':compile'.")
                    .assertHasCause('Could not resolve org.gradle:test:1.85')
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  5. subprojects/core/src/integTest/groovy/org/gradle/initialization/buildsrc/BuildSrcEventsIntegrationTest.groovy

                }
            """
    
            when:
            fails()
    
            then:
            outputContains("root build finished")
            failure.assertHasDescription("buildSrc")
            failure.assertHasDescription("root build")
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Dec 13 02:04:27 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  6. subprojects/core/src/integTest/groovy/org/gradle/api/BuildScriptErrorIntegrationTest.groovy

            buildFile << """
        createTakk('do-stuff')
    """
            when:
            fails()
    
            then:
            failure.assertHasDescription("A problem occurred evaluating root project 'ProjectError'.")
                    .assertHasCause("Could not find method createTakk() for arguments [do-stuff] on root project 'ProjectError")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri May 17 17:01:37 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  7. platforms/core-configuration/model-core/src/integTest/groovy/org/gradle/api/provider/CollectionPropertyIntegrationTest.groovy

            then:
            failure.assertHasDescription("Execution failed for task ':wrongValueTypeDsl'.")
            failure.assertHasCause("Cannot set the value of a property of type java.util.List using an instance of type java.lang.Integer.")
    
            when:
            fails("wrongRuntimeElementType")
    
            then:
            failure.assertHasDescription("Execution failed for task ':wrongRuntimeElementType'.")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Jan 12 19:57:00 UTC 2024
    - 15K bytes
    - Viewed (0)
  8. subprojects/composite-builds/src/integTest/groovy/org/gradle/integtests/composite/CompositeBuildEventsIntegrationTest.groovy

            failure.assertHasFailures(3)
            failure.assertHasDescription("build A broken")
                .assertHasFileName("Build file '${buildA.buildFile}'")
                .assertHasLineNumber(17)
            failure.assertHasDescription("build B broken")
                .assertHasFileName("Build file '${buildB.buildFile}'")
                .assertHasLineNumber(13)
            failure.assertHasDescription("build C broken")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Dec 15 15:38:24 UTC 2023
    - 17.9K bytes
    - Viewed (0)
  9. platforms/ide/tooling-api/src/crossVersionTest/groovy/org/gradle/integtests/tooling/r18/BuildActionCrossVersionSpec.groovy

            BuildActionFailureException e = thrown()
            e.message == /The supplied build action failed with an exception./
            e.cause instanceof BrokenAction.CustomException
    
            and:
            failure.assertHasDescription('this is a custom exception')
            assertHasConfigureFailedLogging()
        }
    
        @TargetGradleVersion(">=3.0 <5.1")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 16 10:10:39 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  10. platforms/core-runtime/base-services/src/integTest/groovy/org/gradle/internal/exceptions/DefaultMultiCauseExceptionIntegrationTest.groovy

                        throw new TestResolutionProviderException('resolution1')
                    }
                }
            """
    
            when:
            fails 'myTask'
    
            then:
            failure.assertHasDescription("Execution failed for task ':myTask'.")
                .assertHasResolution('resolution1')
        }
    
        def 'when tasks throw multi cause exceptions with resolutions offered by the causes, those resolutions are included'() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 3.5K bytes
    - Viewed (0)
Back to top