Search Options

Results per page
Sort
Preferred Languages
Advance

Results 171 - 180 of 456 for assertThrows (0.13 sec)

  1. android/guava-tests/test/com/google/common/net/HostAndPortTest.java

        assertEquals("gmail.com", hp.getHost());
        assertTrue(hp.hasPort());
        assertEquals(81, hp.getPort());
    
        assertThrows(IllegalArgumentException.class, () -> HostAndPort.fromParts("gmail.com:80", 81));
    
        assertThrows(IllegalArgumentException.class, () -> HostAndPort.fromParts("gmail.com", -1));
      }
    
      public void testFromHost() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/math/DoubleUtilsTest.java

    import static com.google.common.math.MathTesting.POSITIVE_FINITE_DOUBLE_CANDIDATES;
    import static com.google.common.truth.Truth.assertThat;
    import static org.junit.Assert.assertThrows;
    
    import java.lang.reflect.Method;
    import java.math.BigInteger;
    import junit.framework.TestCase;
    
    /**
     * Tests for {@link DoubleUtils}.
     *
     * @author Louis Wasserman
     */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 03 18:10:55 UTC 2024
    - 3K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapContainsKeyTester.java

    import static com.google.common.collect.testing.features.MapFeature.ALLOWS_NULL_KEY_QUERIES;
    import static com.google.common.collect.testing.google.ReflectionFreeAssertThrows.assertThrows;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.collect.Multimap;
    import com.google.common.collect.testing.features.CollectionSize;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 19:10:20 UTC 2024
    - 3K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionCreationTester.java

    import static com.google.common.collect.testing.features.CollectionSize.ZERO;
    import static com.google.common.collect.testing.testers.ReflectionFreeAssertThrows.assertThrows;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/FilesTest.java

        assertEquals(temp1, temp2);
        Files.write(ASCII, temp1, UTF_8);
        assertThrows(IllegalArgumentException.class, () -> Files.copy(temp1, temp2));
        assertEquals(ASCII, Files.toString(temp1, UTF_8));
      }
    
      public void testCopySameFile() throws IOException {
        File temp = createTempFile();
        Files.write(ASCII, temp, UTF_8);
        assertThrows(IllegalArgumentException.class, () -> Files.copy(temp, temp));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 22.1K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/ImmutableSetMultimapTest.java

        ImmutableSetMultimap.Builder<String, Integer> builder = ImmutableSetMultimap.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
    - 26.9K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapPutAllMultimapTester.java

        assertThrows(NullPointerException.class, () -> multimap().putAll(source));
        expectUnchanged();
      }
    
      @MapFeature.Require(value = SUPPORTS_PUT, absent = ALLOWS_NULL_KEYS)
      public void testPutAllRejectsNullKey() {
        Multimap<K, V> source = getSubjectGenerator().create(mapEntry(null, v0()));
        assertThrows(NullPointerException.class, () -> multimap().putAll(source));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/google/MultimapPutAllMultimapTester.java

        assertThrows(NullPointerException.class, () -> multimap().putAll(source));
        expectUnchanged();
      }
    
      @MapFeature.Require(value = SUPPORTS_PUT, absent = ALLOWS_NULL_KEYS)
      public void testPutAllRejectsNullKey() {
        Multimap<K, V> source = getSubjectGenerator().create(mapEntry(null, v0()));
        assertThrows(NullPointerException.class, () -> multimap().putAll(source));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java

      }
    
      public void testCorrectExceptions() {
        TestHasher hasher = new TestHasher();
        assertThrows(IndexOutOfBoundsException.class, () -> hasher.putBytes(new byte[8], -1, 4));
        assertThrows(IndexOutOfBoundsException.class, () -> hasher.putBytes(new byte[8], 0, 16));
        assertThrows(IndexOutOfBoundsException.class, () -> hasher.putBytes(new byte[8], 0, -1));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/ImmutableMultimapTest.java

        Builder<String, Integer> builder = new Builder<>();
        assertThrows(
            NullPointerException.class, () -> builder.put(immutableEntry("one", (Integer) null)));
        assertThrows(NullPointerException.class, () -> builder.put(immutableEntry((String) null, 1)));
      }
    
      public void testBuilderWithExpectedKeysNegative() {
        assertThrows(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 6.8K bytes
    - Viewed (0)
Back to top