Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 456 for assertThrows (0.12 sec)

  1. guava-tests/test/com/google/common/graph/ValueGraphTest.java

        graph.putEdgeValue(1, 2, "A");
        IllegalArgumentException e =
            assertThrows(
                IllegalArgumentException.class, () -> graph.edgeValue(EndpointPair.unordered(1, 2)));
        assertThat(e).hasMessageThat().contains(ENDPOINTS_MISMATCH);
        e =
            assertThrows(
                IllegalArgumentException.class, () -> graph.edgeValue(EndpointPair.unordered(2, 1)));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 06 18:35:19 UTC 2024
    - 20K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/AbstractTableTest.java

        assertSize(3);
        assertThrows(NullPointerException.class, () -> table.put(null, 2, cellValue('d')));
        assertThrows(NullPointerException.class, () -> table.put("cat", null, cellValue('d')));
        if (supportsNullValues()) {
          assertNull(table.put("cat", 2, null));
          assertTrue(table.contains("cat", 2));
        } else {
          assertThrows(NullPointerException.class, () -> table.put("cat", 2, null));
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/collect/testing/MapInterfaceTest.java

          // iterator.remove().
          assertFalse(entrySet.contains(entryCopy));
          assertInvariants(map);
          assertThrows(IllegalStateException.class, () -> iterator.remove());
        } else {
          iterator.next();
          assertThrows(UnsupportedOperationException.class, () -> iterator.remove());
        }
        assertInvariants(map);
      }
    
      public void testEntrySetRemove() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 43.8K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/FuturesGetDoneTest.java

        Exception failureCause = new Exception();
        ExecutionException expected =
            assertThrows(ExecutionException.class, () -> getDone(immediateFailedFuture(failureCause)));
        assertThat(expected).hasCauseThat().isEqualTo(failureCause);
      }
    
      public void testCancelled() throws ExecutionException {
        assertThrows(CancellationException.class, () -> getDone(immediateCancelledFuture()));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/ImmutableMapTest.java

            10);
      }
    
      public void testOfNullKey() {
        assertThrows(NullPointerException.class, () -> ImmutableMap.of(null, 1));
    
        assertThrows(NullPointerException.class, () -> ImmutableMap.of("one", 1, null, 2));
      }
    
      public void testOfNullValue() {
        assertThrows(NullPointerException.class, () -> ImmutableMap.of("one", null));
    
        assertThrows(NullPointerException.class, () -> ImmutableMap.of("one", 1, "two", null));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 41.1K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/FakeTimeLimiterTest.java

     */
    
    package com.google.common.util.concurrent;
    
    import static com.google.common.truth.Truth.assertThat;
    import static java.util.concurrent.TimeUnit.MILLISECONDS;
    import static org.junit.Assert.assertThrows;
    
    import java.util.concurrent.Callable;
    import java.util.concurrent.ExecutionException;
    import junit.framework.TestCase;
    
    /**
     * Unit test for {@link FakeTimeLimiter}.
     *
     * @author Jens Nyman
     */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 4K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/google/MultisetAddTester.java

      }
    
      @CollectionFeature.Require(absent = SUPPORTS_ADD)
      public void testAddOccurrences_unsupported() {
        assertThrows(UnsupportedOperationException.class, () -> getMultiset().add(e0(), 2));
      }
    
      @CollectionFeature.Require(SUPPORTS_ADD)
      public void testAddOccurrencesNegative() {
        assertThrows(IllegalArgumentException.class, () -> getMultiset().add(e0(), -1));
      }
    
      @CollectionFeature.Require(SUPPORTS_ADD)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 4K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/ImmutableListTest.java

      }
    
      public void testBuilderAddHandlesNullsCorrectly() {
        ImmutableList.Builder<String> builder = ImmutableList.builder();
        assertThrows(NullPointerException.class, () -> builder.add((String) null));
    
        assertThrows(NullPointerException.class, () -> builder.add((String[]) null));
    
        assertThrows(NullPointerException.class, () -> builder.add("a", null, "b"));
      }
    
      public void testBuilderAddAllHandlesNullsCorrectly() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/primitives/ReflectionFreeAssertThrows.java

      }
    
      @CanIgnoreReturnValue
      static <T extends Throwable> T assertThrows(
          Class<T> expectedThrowable, ThrowingSupplier supplier) {
        return doAssertThrows(expectedThrowable, supplier, /* userPassedSupplier= */ true);
      }
    
      @CanIgnoreReturnValue
      static <T extends Throwable> T assertThrows(
          Class<T> expectedThrowable, ThrowingRunnable runnable) {
        return doAssertThrows(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/math/ReflectionFreeAssertThrows.java

      }
    
      @CanIgnoreReturnValue
      static <T extends Throwable> T assertThrows(
          Class<T> expectedThrowable, ThrowingSupplier supplier) {
        return doAssertThrows(expectedThrowable, supplier, /* userPassedSupplier= */ true);
      }
    
      @CanIgnoreReturnValue
      static <T extends Throwable> T assertThrows(
          Class<T> expectedThrowable, ThrowingRunnable runnable) {
        return doAssertThrows(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 6.3K bytes
    - Viewed (0)
Back to top