Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 278 for assertThrows (0.17 sec)

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

        UnsupportedOperationException e =
            assertThrows(UnsupportedOperationException.class, () -> nodes.add(N2));
        addNode(N1);
        assertThat(network.nodes()).containsExactlyElementsIn(nodes);
      }
    
      @Override
      @Test
      public void edges_checkReturnedSetMutability() {
        Set<String> edges = network.edges();
        UnsupportedOperationException e =
            assertThrows(UnsupportedOperationException.class, () -> edges.add(E12));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 19.3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/graph/AbstractStandardDirectedNetworkTest.java

        assume().that(graphIsMutable()).isTrue();
    
        addEdge(N1, N2, E12);
        IllegalArgumentException e =
            assertThrows(
                IllegalArgumentException.class, () -> networkAsMutableNetwork.addEdge(N4, N5, E12));
        assertThat(e).hasMessageThat().contains(ERROR_REUSE_EDGE);
        e = assertThrows(IllegalArgumentException.class, () -> addEdge(N2, N1, E12));
        assertThat(e).hasMessageThat().contains(ERROR_REUSE_EDGE);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.6K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java

        PotentialDeadlockException expected =
            assertThrows(PotentialDeadlockException.class, () -> lock2.lock());
        checkMessage(expected, "MyOrder.THIRD -> MyOrder.SECOND");
    
        expected = assertThrows(PotentialDeadlockException.class, () -> lock1.lock());
        checkMessage(expected, "MyOrder.THIRD -> MyOrder.FIRST");
    
        lock3.unlock();
        lock2.lock();
    
        expected = assertThrows(PotentialDeadlockException.class, () -> lock1.lock());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.1K bytes
    - Viewed (1)
  4. guava-tests/test/com/google/common/graph/AbstractGraphTest.java

            assertThrows(IllegalStateException.class, n1AdjacentNodes::size));
        assertNodeRemovedFromGraphErrorMessage(
            assertThrows(IllegalStateException.class, n1Predecessors::size));
        assertNodeRemovedFromGraphErrorMessage(
            assertThrows(IllegalStateException.class, n1Successors::size));
        assertNodeRemovedFromGraphErrorMessage(
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Jan 22 17:29:38 GMT 2024
    - 16.6K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/reflect/MutableTypeToInstanceMapTest.java

        map = new MutableTypeToInstanceMap<>();
      }
    
      public void testPutThrows() {
        assertThrows(
            UnsupportedOperationException.class,
            () -> map.put(TypeToken.of(Integer.class), Integer.valueOf(5)));
      }
    
      public void testPutAllThrows() {
        assertThrows(
            UnsupportedOperationException.class,
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedTest.java

        SettableFuture<String> future = SettableFuture.create();
        future.cancel(true);
        assertThrows(
            CancellationException.class, () -> getChecked(future, TwoArgConstructorException.class));
      }
    
      public void testGetCheckedUntimed_ExecutionExceptionChecked() {
        TwoArgConstructorException expected =
            assertThrows(
                TwoArgConstructorException.class,
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.4K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        assertThrows(IllegalArgumentException.class, () -> builder.maximumWeight(-1));
      }
    
      @GwtIncompatible // maximumWeight
      public void testMaximumWeight_setTwice() {
        CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().maximumWeight(16);
        assertThrows(IllegalStateException.class, () -> builder.maximumWeight(16));
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 23.2K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/FakeTimeLimiterTest.java

     * limitations under the License.
     */
    
    package com.google.common.util.concurrent;
    
    import static com.google.common.truth.Truth.assertThat;
    import static org.junit.Assert.assertThrows;
    
    import java.util.concurrent.Callable;
    import java.util.concurrent.ExecutionException;
    import java.util.concurrent.TimeUnit;
    import junit.framework.TestCase;
    
    /**
     * Unit test for {@link FakeTimeLimiter}.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/graph/ValueGraphTest.java

        graph.putEdgeValue(1, 2, "A");
        IllegalArgumentException e =
            assertThrows(
                IllegalArgumentException.class,
                () -> graph.edgeValueOrDefault(EndpointPair.unordered(1, 2), "default"));
        assertThat(e).hasMessageThat().contains(ENDPOINTS_MISMATCH);
        e =
            assertThrows(
                IllegalArgumentException.class,
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 17.4K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/DiscreteDomainTest.java

      }
    
      public void testBigIntegersOffsetExceptions() {
        assertThrows(
            IllegalArgumentException.class,
            () -> DiscreteDomain.bigIntegers().offset(BigInteger.ZERO, -1));
      }
    
      public void testCustomOffsetExceptions() {
        assertThrows(IllegalArgumentException.class, () -> new MyIntegerDomain().offset(0, -1));
        assertThrows(
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.6K bytes
    - Viewed (0)
Back to top