Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for testToOptionalEmpty (0.06 sec)

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

    /**
     * Tests for {@code MoreCollectors}.
     *
     * @author Louis Wasserman
     */
    @GwtCompatible
    @NullMarked
    public class MoreCollectorsTest extends TestCase {
      public void testToOptionalEmpty() {
        assertThat(Stream.empty().collect(toOptional())).isEmpty();
      }
    
      public void testToOptionalSingleton() {
        assertThat(Stream.of(1).collect(toOptional())).hasValue(1);
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu May 15 21:47:56 UTC 2025
    - 3.2K bytes
    - Viewed (0)
Back to top