Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for throwsException (0.18 sec)

  1. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/reflect/JavaMethodTestSubject.java

        }
    
        public void setMyProperty(String value) {
            myProp = value;
        }
    
        public void setMyProperty(Object value) {
            myProp = value.toString();
        }
    
        public void throwsException() {
            throw failure;
        }
    
        static class TestCheckedException extends Exception {
            public TestCheckedException(Throwable cause) {
                super(cause);
            }
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  2. platforms/core-configuration/model-core/src/test/groovy/org/gradle/internal/reflect/JavaTestSubject.java

        }
    
        public void setParamProperty() {
        }
    
        public void setParamProperty(String param, String someOther) {
        }
    
        public void setWriteOnly(String param) {
        }
    
        public void throwsException() {
            throw failure;
        }
    
        static class TestCheckedException extends Exception {
            public TestCheckedException(Throwable cause) {
                super(cause);
            }
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  3. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/reflect/JavaMethodTest.groovy

            !JavaMethod.of(myProperties.class, String, "getMyProperty").isStatic()
        }
    
        def "call failing methods reflectively"() {
            when:
            JavaMethod.of(myProperties.class, Void, "throwsException").invoke(myProperties)
    
            then:
            IllegalStateException e = thrown()
            e == myProperties.failure
    
            when:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  4. platforms/jvm/normalization-java/src/test/groovy/org/gradle/api/internal/changedetection/state/LineEndingNormalizingResourceHasherTest.groovy

            and:
            def e = thrown(thrownException)
            exception == thrownException || e.cause.class == exception
    
            when:
            hasher.hash(zipContext)
    
            then:
            1 * delegate.hash(zipContext) >> { throw exception.getDeclaredConstructor().newInstance() }
    
            and:
            e = thrown(thrownException)
            exception == thrownException || e.cause.class == exception
    
            where:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 15:09:49 UTC 2023
    - 7.9K bytes
    - Viewed (0)
  5. subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/execution/SkipOnlyIfTaskExecuterTest.groovy

            GradleException thrownException = null
    
            when:
            executer.execute(task, state, executionContext)
    
            then:
            1 * spec.findUnsatisfiedSpec(task) >> { throw failure }
            1 * state.setOutcome(_ as Throwable) >> { args -> thrownException = args[0] }
            noMoreInteractions()
    
            thrownException.message.startsWith('Could not evaluate onlyIf predicate for')
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Jan 24 11:36:30 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/CloserTest.java

        try {
          try {
            throw thrownException;
          } catch (Throwable e) {
            throw closer.rethrow(thrownException, IOException.class);
          } finally {
            assertThat(thrownException.getSuppressed()).isEmpty();
            closer.close();
          }
        } catch (IOException expected) {
          assertSame(thrownException, expected);
        }
    
        assertTrue(c1.isClosed());
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 07 15:26:58 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  7. maven-core/src/test/java/org/apache/maven/session/scope/SessionScopeProxyTest.java

            assertNotNull(bean.myBean.getAnotherBean());
            assertSame(bean.myBean.getAnotherBean().getClass(), AnotherBean.class);
            assertThrows(TestException.class, () -> bean.myBean.throwException());
        }
    
        @Named
        static class MySingletonBean {
            @Inject
            @Named("scoped")
            BeanItf myBean;
    
            @Inject
            @Named("another")
            BeanItf2 anotherBean;
    Registered: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Tue Apr 23 12:52:20 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  8. platforms/ide/tooling-api/src/crossVersionTest/groovy/org/gradle/integtests/tooling/r32/BrokenBuildAction.java

        public static final String BUILD_ACTION_EXCEPTION_MESSAGE = "Something went wrong when executing the build action";
    
        public String execute(BuildController controller) {
            throwException();
            return "";
        }
    
        abstract void throwException();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 26 14:49:20 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  9. platforms/jvm/normalization-java/src/test/groovy/org/gradle/api/internal/changedetection/state/LineEndingNormalizingFileSystemLocationSnapshotHasherTest.groovy

            then:
            1 * delegate.hash(snapshot) >> { throw exception.getDeclaredConstructor().newInstance() }
    
            and:
            def e = thrown(thrownException)
            exception == thrownException || e.cause.class == exception
    
            where:
            exception        | thrownException
            IOException      | UncheckedIOException
            RuntimeException | RuntimeException
        }
    
        File file(String path) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 15:09:49 UTC 2023
    - 5.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

      protected volatile boolean throwException = false;
    
      protected final ListenableFutureTask<Integer> task =
          ListenableFutureTask.create(
              new Callable<Integer>() {
                @Override
                public Integer call() throws Exception {
                  runLatch.countDown();
                  taskLatch.await();
                  if (throwException) {
                    throw new IllegalStateException("Fail");
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 4.7K bytes
    - Viewed (0)
Back to top