Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 456 for assertThrows (0.06 sec)

  1. guava-testlib/src/com/google/common/collect/testing/testers/MapCreationTester.java

        Entry<K, V>[] entries = getEntriesMultipleNullKeys();
        assertThrows(IllegalArgumentException.class, () -> resetMap(entries));
      }
    
      @MapFeature.Require(REJECTS_DUPLICATES_AT_CREATION)
      @CollectionSize.Require(absent = {ZERO, ONE})
      public void testCreateWithDuplicates_nonNullDuplicatesRejected() {
        Entry<K, V>[] entries = getEntriesMultipleNonNullKeys();
        assertThrows(IllegalArgumentException.class, () -> resetMap(entries));
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  2. android/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)
  3. guava-tests/test/com/google/common/base/PreconditionsTest.java

      }
    
      public void testCheckArgument_simple_failure() {
        assertThrows(IllegalArgumentException.class, () -> checkArgument(false));
      }
    
      public void testCheckArgument_simpleMessage_success() {
        checkArgument(true, IGNORE_ME);
      }
    
      public void testCheckArgument_simpleMessage_failure() {
        IllegalArgumentException expected =
            assertThrows(IllegalArgumentException.class, () -> checkArgument(false, new Message()));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 19K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/net/MediaTypeTest.java

        assertThrows(IllegalArgumentException.class, () -> MediaType.parse("text/pl@in"));
        assertThrows(IllegalArgumentException.class, () -> MediaType.parse("text/plain;"));
        assertThrows(IllegalArgumentException.class, () -> MediaType.parse("text/plain; "));
        assertThrows(IllegalArgumentException.class, () -> MediaType.parse("text/plain; a"));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  5. 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)
  6. guava-testlib/src/com/google/common/collect/testing/testers/ListGetTester.java

        // This calls get() on each index and checks the result:
        expectContents(createOrderedArray());
      }
    
      public void testGet_negative() {
        assertThrows(IndexOutOfBoundsException.class, () -> getList().get(-1));
      }
    
      public void testGet_tooLarge() {
        assertThrows(IndexOutOfBoundsException.class, () -> getList().get(getNumElements()));
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 20:00:30 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/base/AsciiTest.java

      }
    
      public void testTruncateIllegalArguments() {
        assertThrows(IllegalArgumentException.class, () -> Ascii.truncate("foobar", 2, "..."));
    
        assertThrows(IllegalArgumentException.class, () -> Ascii.truncate("foobar", 8, "1234567890"));
    
        assertThrows(IllegalArgumentException.class, () -> Ascii.truncate("foobar", -1, "..."));
    
        assertThrows(IllegalArgumentException.class, () -> Ascii.truncate("foobar", -1, ""));
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/math/LinearTransformationTest.java

        assertThrows(
            IllegalArgumentException.class,
            () -> LinearTransformation.mapping(1.2, 3.4).and(Double.NEGATIVE_INFINITY, 7.8));
      }
    
      public void testMappingAnd_infiniteY2() {
        assertThrows(
            IllegalArgumentException.class,
            () -> LinearTransformation.mapping(1.2, 3.4).and(5.6, Double.POSITIVE_INFINITY));
      }
    
      public void testMapping_nanX1() {
        assertThrows(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/math/LinearTransformationTest.java

        assertThrows(
            IllegalArgumentException.class,
            () -> LinearTransformation.mapping(1.2, 3.4).and(Double.NEGATIVE_INFINITY, 7.8));
      }
    
      public void testMappingAnd_infiniteY2() {
        assertThrows(
            IllegalArgumentException.class,
            () -> LinearTransformation.mapping(1.2, 3.4).and(5.6, Double.POSITIVE_INFINITY));
      }
    
      public void testMapping_nanX1() {
        assertThrows(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/testers/MapPutIfAbsentTester.java

    import static com.google.common.collect.testing.features.MapFeature.SUPPORTS_PUT;
    import static com.google.common.collect.testing.testers.ReflectionFreeAssertThrows.assertThrows;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.collect.testing.AbstractMapTester;
    import com.google.common.collect.testing.features.CollectionSize;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 20:00:30 UTC 2024
    - 4.8K bytes
    - Viewed (0)
Back to top