- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for hasValue (0.04 sec)
-
guava-tests/test/com/google/common/base/EnumsTest.java
HONDA, POODLE, } public void testGetIfPresent() { assertThat(Enums.getIfPresent(TestEnum.class, "CHEETO")).hasValue(TestEnum.CHEETO); assertThat(Enums.getIfPresent(TestEnum.class, "HONDA")).hasValue(TestEnum.HONDA); assertThat(Enums.getIfPresent(TestEnum.class, "POODLE")).hasValue(TestEnum.POODLE); assertThat(Enums.getIfPresent(TestEnum.class, "CHEETO")).isPresent();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed May 29 16:29:37 UTC 2024 - 8.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/MoreCollectorsTest.java
public void testToOptionalEmpty() { assertThat(Stream.empty().collect(toOptional())).isEmpty(); } public void testToOptionalSingleton() { assertThat(Stream.of(1).collect(toOptional())).hasValue(1); } public void testToOptionalNull() { Stream<@Nullable Object> stream = Stream.of((Object) null); assertThrows(NullPointerException.class, () -> stream.collect(toOptional())); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 3.2K bytes - Viewed (0)