Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for executeWithException (0.25 sec)

  1. platforms/core-runtime/functional/src/test/groovy/org/gradle/internal/io/AbstractIoTest.groovy

    package org.gradle.internal.io
    
    import spock.lang.Specification
    
    abstract class AbstractIoTest extends Specification {
    
        protected abstract void executeWithException(Throwable exception)
    
        def "unchecked #type.simpleName is thrown directly"() {
            when:
            executeWithException(original)
            then:
            def ex = thrown type
            ex === original
    
            where:
            original << [
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:22:02 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  2. platforms/core-runtime/functional/src/test/groovy/org/gradle/internal/io/IoConsumerTest.groovy

            when:
            String actual = null
            wrap({ String payload -> actual = payload }).accept("lajos")
            then:
            actual == "lajos"
        }
    
        @Override
        protected void executeWithException(Throwable exception) {
            wrap({ String payload ->
                assert payload == "lajos"
                throw exception
            }).accept("lajos")
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:22:02 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  3. platforms/core-runtime/functional/src/test/groovy/org/gradle/internal/io/IoPredicateTest.groovy

            then:
            actual == expected
            encountered == "lajos"
    
            where:
            expected << [true, false]
        }
    
        @Override
        protected void executeWithException(Throwable exception) {
            wrap({ String t ->
                assert t == "lajos"
                throw exception
            }).test("lajos")
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:22:02 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  4. platforms/core-runtime/functional/src/test/groovy/org/gradle/internal/io/IoSupplierTest.groovy

    class IoSupplierTest extends AbstractIoTest {
    
        def "executed when it doesn't throw"() {
            expect:
            wrap({ "lajos" }).get() == "lajos"
        }
    
        @Override
        protected void executeWithException(Throwable exception) {
            wrap({ throw exception }).get()
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:22:02 UTC 2023
    - 987 bytes
    - Viewed (0)
  5. platforms/core-runtime/functional/src/test/groovy/org/gradle/internal/io/IoFunctionTest.groovy

        def "executed when it doesn't throw"() {
            expect:
            wrap({ String t -> "wrapped:$t" }).apply("lajos") == "wrapped:lajos"
        }
    
        @Override
        protected void executeWithException(Throwable exception) {
            wrap({ String t ->
                assert t == "lajos"
                throw exception
            }).apply("lajos")
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:22:02 UTC 2023
    - 1.1K bytes
    - Viewed (0)
Back to top