Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 169 for assertThrows (0.1 sec)

  1. android/guava-tests/test/com/google/common/io/MoreFilesTest.java

        assertFalse(Files.exists(parent));
        assertThrows(IOException.class, () -> MoreFiles.createParentDirectories(file));
      }
    
      public void testCreateParentDirectories_nonDirectoryParentExists() throws IOException {
        Path parent = createTempFile();
        assertTrue(Files.isRegularFile(parent));
        Path file = parent.resolve("foo");
        assertThrows(IOException.class, () -> MoreFiles.createParentDirectories(file));
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 16:07:00 UTC 2024
    - 26.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/base/ThrowablesTest.java

    public class ThrowablesTest extends TestCase {
      public void testThrowIfUnchecked_unchecked() {
        assertThrows(
            SomeUncheckedException.class, () -> throwIfUnchecked(new SomeUncheckedException()));
      }
    
      public void testThrowIfUnchecked_error() {
        assertThrows(SomeError.class, () -> throwIfUnchecked(new SomeError()));
      }
    
      @SuppressWarnings("ThrowIfUncheckedKnownChecked")
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/math/PairedStatsAccumulatorTest.java

      }
    
      public void testSampleCovariance() {
        assertThrows(IllegalStateException.class, () -> emptyAccumulator.sampleCovariance());
        assertThrows(
            IllegalStateException.class,
            () -> emptyAccumulatorByAddAllEmptyPairedStats.sampleCovariance());
        assertThrows(IllegalStateException.class, () -> oneValueAccumulator.sampleCovariance());
        assertThrows(
            IllegalStateException.class,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 03 21:17:33 UTC 2024
    - 23.3K bytes
    - Viewed (0)
  4. 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());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 16.1K bytes
    - Viewed (0)
  5. 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());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 16.1K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/net/InetAddressesTest.java

      }
    
      public void testForUriStringBad() {
        assertThrows(IllegalArgumentException.class, () -> InetAddresses.forUriString(""));
    
        assertThrows(
            IllegalArgumentException.class, () -> InetAddresses.forUriString("192.168.999.888"));
    
        assertThrows(
            IllegalArgumentException.class, () -> InetAddresses.forUriString("www.google.com"));
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 24 16:44:05 UTC 2024
    - 35.3K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/math/StatsTest.java

      }
    
      public void testSampleVariance() {
        assertThrows(IllegalStateException.class, () -> EMPTY_STATS_VARARGS.sampleVariance());
        assertThrows(IllegalStateException.class, () -> EMPTY_STATS_ITERABLE.sampleVariance());
        assertThrows(IllegalStateException.class, () -> ONE_VALUE_STATS.sampleVariance());
        assertThat(TWO_VALUES_STATS.sampleVariance())
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 23 16:45:30 UTC 2024
    - 33.3K bytes
    - Viewed (0)
  8. android/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
    - 24.1K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/ImmutableListMultimapTest.java

        ImmutableListMultimap.Builder<String, Integer> builder = ImmutableListMultimap.builder();
        assertThrows(NullPointerException.class, () -> builder.put(null, 1));
        assertThrows(NullPointerException.class, () -> builder.putAll(null, Arrays.asList(1, 2, 3)));
        assertThrows(NullPointerException.class, () -> builder.putAll(null, 1, 2, 3));
        assertThrows(
            NullPointerException.class, () -> builder.putAll((Multimap<String, Integer>) toPut));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/ImmutableMultisetTest.java

        ImmutableMultiset.Builder<String> builder = ImmutableMultiset.builder();
        assertThrows(NullPointerException.class, () -> builder.add((String) null));
      }
    
      public void testBuilderAddAllHandlesNullsCorrectly() {
        {
        ImmutableMultiset.Builder<String> builder = ImmutableMultiset.builder();
          assertThrows(NullPointerException.class, () -> builder.addAll((Collection<String>) null));
        }
    
        {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 20.8K bytes
    - Viewed (0)
Back to top