Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for hasValue (0.18 sec)

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

      }
    
      private enum OtherEnum {}
    
      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();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 8.8K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/base/EnumsTest.java

      }
    
      private enum OtherEnum {}
    
      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();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 8.8K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/FluentIterableTest.java

        assertThat(iterable.firstMatch(Predicates.equalTo("cool"))).hasValue("cool");
        assertThat(iterable.firstMatch(Predicates.equalTo("pants"))).hasValue("pants");
        assertThat(iterable.firstMatch(Predicates.alwaysFalse())).isAbsent();
        assertThat(iterable.firstMatch(Predicates.alwaysTrue())).hasValue("cool");
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 18:35:19 GMT 2024
    - 31.1K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/net/MediaTypeTest.java

        assertThat(MediaType.parse("text/plain; charset =utf-8").charset()).hasValue(UTF_8);
        assertThat(MediaType.parse("text/plain; charset= utf-8").charset()).hasValue(UTF_8);
        assertThat(MediaType.parse("text/plain; charset = utf-8").charset()).hasValue(UTF_8);
        assertThat(MediaType.parse("text/plain;charset =utf-8").charset()).hasValue(UTF_8);
      }
    
      public void testGetCharset() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Mar 05 13:16:00 GMT 2024
    - 21.4K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/net/MediaTypeTest.java

        assertThat(MediaType.parse("text/plain; charset =utf-8").charset()).hasValue(UTF_8);
        assertThat(MediaType.parse("text/plain; charset= utf-8").charset()).hasValue(UTF_8);
        assertThat(MediaType.parse("text/plain; charset = utf-8").charset()).hasValue(UTF_8);
        assertThat(MediaType.parse("text/plain;charset =utf-8").charset()).hasValue(UTF_8);
      }
    
      public void testGetCharset() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Mar 05 13:16:00 GMT 2024
    - 21.4K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/FluentIterableTest.java

        assertThat(iterable.firstMatch(Predicates.equalTo("cool"))).hasValue("cool");
        assertThat(iterable.firstMatch(Predicates.equalTo("pants"))).hasValue("pants");
        assertThat(iterable.firstMatch(Predicates.alwaysFalse())).isAbsent();
        assertThat(iterable.firstMatch(Predicates.alwaysTrue())).hasValue("cool");
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jun 06 17:32:08 GMT 2023
    - 30.6K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/MoreCollectorsTest.java

        assertThat(Stream.empty().collect(MoreCollectors.toOptional())).isEmpty();
      }
    
      public void testToOptionalSingleton() {
        assertThat(Stream.of(1).collect(MoreCollectors.toOptional())).hasValue(1);
      }
    
      public void testToOptionalNull() {
        Stream<@Nullable Object> stream = Stream.of((Object) null);
        try {
          stream.collect(MoreCollectors.toOptional());
          fail("Expected NullPointerException");
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/graph/ValueGraphTest.java

        graph.putEdgeValue(1, 2, "A");
        assertThat(graph.edgeValue(EndpointPair.unordered(1, 2))).hasValue("A");
      }
    
      @Test
      public void edgeValue_undirected_backwards() {
        graph = ValueGraphBuilder.undirected().build();
        graph.putEdgeValue(1, 2, "A");
        assertThat(graph.edgeValue(EndpointPair.unordered(2, 1))).hasValue("A");
      }
    
      @Test
      public void edgeValue_undirected_mismatch() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 18:35:19 GMT 2024
    - 20K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/StreamsTest.java

        assertThat(findLast(Stream.of())).isEmpty();
        assertThat(findLast(Stream.of("a", "b", "c", "d"))).hasValue("d");
    
        // test with a large, not-subsized Spliterator
        List<Integer> list =
            IntStream.rangeClosed(0, 10000).boxed().collect(Collectors.toCollection(LinkedList::new));
        assertThat(findLast(list.stream())).hasValue(10000);
    
        // no way to find out the stream is empty without walking its spliterator
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 20K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/IterablesTest.java

        Iterable<String> list = newArrayList("cool", "pants");
        assertThat(Iterables.tryFind(list, Predicates.equalTo("cool"))).hasValue("cool");
        assertThat(Iterables.tryFind(list, Predicates.equalTo("pants"))).hasValue("pants");
        assertThat(Iterables.tryFind(list, Predicates.alwaysTrue())).hasValue("cool");
        assertThat(Iterables.tryFind(list, Predicates.alwaysFalse())).isAbsent();
        assertCanIterateAgain(list);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 46K bytes
    - Viewed (0)
Back to top