Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for testGetIfPresent (0.11 sec)

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

     *
     * @author Steve McKay
     */
    @GwtIncompatible
    @J2ktIncompatible
    public class EnumsTest extends TestCase {
    
      private enum TestEnum {
        CHEETO,
        HONDA,
        POODLE,
      }
    
      public void testGetIfPresent() {
        assertThat(Enums.getIfPresent(TestEnum.class, "CHEETO")).hasValue(TestEnum.CHEETO);
        assertThat(Enums.getIfPresent(TestEnum.class, "HONDA")).hasValue(TestEnum.HONDA);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed May 29 16:29:37 UTC 2024
    - 8.7K bytes
    - Viewed (0)
Back to top