@Test public void testPrintHelp() { final String output = captureOutput(Command::printHelp); LOGGER.info("help: \n{}", output); assertFalse("help should not be empty", output.isEmpty()); }
IO<Nothing> printHelp(final @NotNull Function<Object, IO<Nothing>> linePrinter) { return uncheck0(() -> { try (InputStream input = Command.class.getResourceAsStream(COMMAND_HELP_TXT); BufferedReader reader = new BufferedReader(new InputStreamReader(input, StandardCharsets.UTF_8))) { return reader.lines().map(linePrinter).reduce(IO.empty, IO::add); } }).get(); }
Command { IO<Nothing> printHelp(final @NotNull Function<Object, IO<Nothing>> linePrinter) { return uncheck0(() -> { try (InputStream input = Command.class.getResourceAsStream(COMMAND_HELP_TXT); BufferedReader reader = new BufferedReader(new InputStreamReader(input, StandardCharsets.UTF_8))) { return reader.lines().map(linePrinter).reduce(IO.empty, IO::add); } }).get(); } }
Command { IO<Nothing> printHelp(final @NotNull Function<Object, IO<Nothing>> linePrinter) { return uncheck0(() -> { try (InputStream input = Command.class.getResourceAsStream(COMMAND_HELP_TXT); BufferedReader reader = new BufferedReader(new InputStreamReader(input, StandardCharsets.UTF_8))) { return reader.lines().map(linePrinter).reduce(IO.empty, IO::add); } }).get(); }  }
Command { IO<Nothing> printHelp(final @NotNull Function<Object, IO<Nothing>> linePrinter) { return uncheck0(() -> { try (InputStream input = Command.class.getResourceAsStream(COMMAND_HELP_TXT); BufferedReader reader = new BufferedReader(new InputStreamReader(input, StandardCharsets.UTF_8))) { return reader.lines().map(linePrinter).reduce(IO.empty, IO::add); } }).get(); }   }
Command { IO<Nothing> printHelp(final @NotNull Function<Object, IO<Nothing>> linePrinter) { return uncheck0(() -> { try (InputStream input = Command.class.getResourceAsStream(COMMAND_HELP_TXT); BufferedReader reader = new BufferedReader(new InputStreamReader(input, StandardCharsets.UTF_8))) { return reader.lines().map(linePrinter).reduce(IO.empty, IO::add); } }).get(); }    }