MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / test

Method test

streams/Optionals.java:34–39  ·  view source on GitHub ↗
(String testName,
    Consumer<Optional<String>> cos)

Source from the content-addressed store, hash-verified

32 }
33 }
34 static void test(String testName,
35 Consumer<Optional<String>> cos) {
36 System.out.println(" === " + testName + " === ");
37 cos.accept(Stream.of("Epithets").findFirst());
38 cos.accept(Stream.<String>empty().findFirst());
39 }
40 public static void main(String[] args) {
41 test("basics", Optionals::basics);
42 test("ifPresent", Optionals::ifPresent);

Callers 1

mainMethod · 0.95

Calls 2

acceptMethod · 0.65
emptyMethod · 0.45

Tested by

no test coverage detected