Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 136 for assertThrows (1.5 sec)

  1. guava-tests/test/com/google/common/collect/FilteredCollectionsTestUtil.java

            C unfiltered = createUnfiltered(contents);
            C filtered1 = filter(unfiltered, EVEN);
            C filtered2 = filter(filtered1, PRIME_DIGIT);
    
            assertThrows(IllegalArgumentException.class, () -> filtered2.add(4));
    
            assertThrows(IllegalArgumentException.class, () -> filtered2.add(3));
    
            filtered2.add(2);
          }
        }
    
        public void testClearFilterFiltered() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/CharSourceTest.java

        TestCharSource failSource = new TestCharSource(STRING, READ_THROWS);
        assertThrows(IOException.class, () -> failSource.copyTo(new TestCharSink()));
        assertTrue(failSource.wasStreamClosed());
      }
    
      public void testClosesOnErrors_copyingToWriterThatThrows() {
        TestCharSource okSource = new TestCharSource(STRING);
        assertThrows(IOException.class, () -> okSource.copyTo(new TestWriter(WRITE_THROWS)));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java

        // inclusive.
        assertThrows(
            NumberFormatException.class,
            () -> UnsignedBytes.parseUnsignedByte("0", Character.MIN_RADIX - 1));
    
        assertThrows(
            NumberFormatException.class,
            () -> UnsignedBytes.parseUnsignedByte("0", Character.MAX_RADIX + 1));
    
        // The radix is used as an array index, so try a negative value.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/ServiceManagerTest.java

        ServiceManager manager = new ServiceManager(asList(a));
        manager.startAsync();
        assertThrows(TimeoutException.class, () -> manager.awaitHealthy(1, TimeUnit.MILLISECONDS));
        manager.awaitHealthy(5, SECONDS); // no exception thrown
    
        manager.stopAsync();
        assertThrows(TimeoutException.class, () -> manager.awaitStopped(1, TimeUnit.MILLISECONDS));
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Oct 02 17:20:27 GMT 2023
    - 23.9K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/ByteSourceTest.java

        assertFalse(source.contentEquals(oneByteOff));
      }
    
      public void testSlice() throws IOException {
        // Test preconditions
        assertThrows(IllegalArgumentException.class, () -> source.slice(-1, 10));
    
        assertThrows(IllegalArgumentException.class, () -> source.slice(0, -1));
    
        assertCorrectSlice(0, 0, 0, 0);
        assertCorrectSlice(0, 0, 1, 0);
        assertCorrectSlice(100, 0, 10, 10);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/ImmutableRangeSetTest.java

        assertThrows(
            UnsupportedOperationException.class,
            () -> rangeSet.removeAll(ImmutableRangeSet.<Integer>of()));
    
        assertThrows(
            UnsupportedOperationException.class,
            () -> rangeSet.removeAll(ImmutableRangeSet.of(Range.closed(6, 8))));
      }
    
      @AndroidIncompatible // slow
      public void testExhaustive() {
        ImmutableSet<Range<Integer>> ranges =
            ImmutableSet.of(
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 21.2K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java

        // inclusive.
        assertThrows(
            NumberFormatException.class,
            () -> UnsignedBytes.parseUnsignedByte("0", Character.MIN_RADIX - 1));
    
        assertThrows(
            NumberFormatException.class,
            () -> UnsignedBytes.parseUnsignedByte("0", Character.MAX_RADIX + 1));
    
        // The radix is used as an array index, so try a negative value.
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

                    executor.execute(Runnables.doNothing());
                  }
                });
        future.get(10, TimeUnit.SECONDS);
        assertThrows(RejectedExecutionException.class, () -> executor.execute(Runnables.doNothing()));
        latch.countDown();
        ExecutionException expected =
            assertThrows(ExecutionException.class, () -> first.get(10, TimeUnit.SECONDS));
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.4K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/eventbus/EventBusTest.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package com.google.common.eventbus;
    
    import static org.junit.Assert.assertThrows;
    
    import com.google.common.collect.ImmutableList;
    import com.google.common.collect.Lists;
    import java.util.List;
    import java.util.concurrent.ExecutorService;
    import java.util.concurrent.Executors;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/eventbus/EventBusTest.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package com.google.common.eventbus;
    
    import static org.junit.Assert.assertThrows;
    
    import com.google.common.collect.ImmutableList;
    import com.google.common.collect.Lists;
    import java.util.List;
    import java.util.concurrent.ExecutorService;
    import java.util.concurrent.Executors;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 11.3K bytes
    - Viewed (0)
Back to top