Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for testFromNullable (0.08 seconds)

  1. android/guava-tests/test/com/google/common/base/OptionalTest.java

        assertThat(Optional.of("training").get()).isEqualTo("training");
      }
    
      public void testOf_null() {
        assertThrows(NullPointerException.class, () -> Optional.of(null));
      }
    
      public void testFromNullable() {
        Optional<String> optionalName = Optional.fromNullable("bob");
        assertThat(optionalName.get()).isEqualTo("bob");
      }
    
      public void testFromNullable_null() {
        // not promised by spec, but easier to test
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 15:59:55 GMT 2026
    - 10.6K bytes
    - Click Count (0)
Back to Top