Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 407 for assertThrows (0.09 sec)

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

        assertThrows(
            ConcurrentModificationException.class,
            () -> {
              Iterator<E> iterator = collection.iterator();
              getList().add(0, e3());
              iterator.next();
            });
      }
    
      @ListFeature.Require(absent = SUPPORTS_ADD_WITH_INDEX)
      public void testAddAtIndex_unsupportedNotPresent() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/ResourcesTest.java

    import static com.google.common.truth.Truth.assertThat;
    import static java.nio.charset.StandardCharsets.US_ASCII;
    import static java.nio.charset.StandardCharsets.UTF_8;
    import static org.junit.Assert.assertThrows;
    
    import com.google.common.collect.ImmutableList;
    import com.google.common.testing.NullPointerTester;
    import java.io.ByteArrayOutputStream;
    import java.io.File;
    import java.io.IOException;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapContainsEntryTester.java

      public void testContainsEntryNullDisallowedBecauseKeyQueriesDisallowed() {
        assertThrows(NullPointerException.class, () -> multimap().containsEntry(null, v3()));
      }
    
      @MapFeature.Require(absent = ALLOWS_NULL_VALUE_QUERIES)
      public void testContainsEntryNullDisallowedBecauseValueQueriesDisallowed() {
        assertThrows(NullPointerException.class, () -> multimap().containsEntry(k3(), null));
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 19:10:20 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/RequestBodyTest.kt

          requestBody.writeTo(buffer)
          assertThat(buffer.readUtf8()).isEqualTo("Hello")
    
          assertThrows(IOException::class.java) {
            requestBody.writeTo(Buffer())
          }
        }
      }
    
      @Test
      fun testFileDescriptorAfterClose() {
        val closedRequestBody = assertOnFileDescriptor { it.toRequestBody() }
    
        assertThrows(IOException::class.java) {
          closedRequestBody.writeTo(Buffer())
        }
      }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapPutIterableTester.java

    import static com.google.common.collect.testing.features.MapFeature.SUPPORTS_PUT;
    import static com.google.common.collect.testing.google.ReflectionFreeAssertThrows.assertThrows;
    import static java.util.Collections.singletonList;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.collect.ImmutableSet;
    import com.google.common.collect.Iterators;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapReplaceValuesTester.java

        List<V> values = singletonList(v3());
        assertThrows(UnsupportedOperationException.class, () -> multimap().replaceValues(k0(), values));
      }
    
      @MapFeature.Require(absent = SUPPORTS_PUT)
      public void testReplaceValuesPutNotSupported() {
        List<V> values = singletonList(v3());
        assertThrows(UnsupportedOperationException.class, () -> multimap().replaceValues(k0(), values));
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/google/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: Thu Oct 17 19:10:20 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  8. guava-testlib/test/com/google/common/testing/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: Tue Oct 22 13:49:09 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/testers/QueueOfferTester.java

    import static com.google.common.collect.testing.features.CollectionFeature.SUPPORTS_ADD;
    import static com.google.common.collect.testing.testers.ReflectionFreeAssertThrows.assertThrows;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.collect.testing.features.CollectionFeature;
    import org.junit.Ignore;
    
    /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 20:00:30 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  10. 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)
Back to top