@Test
  public void testApplyWithNullString() {

    assertEquals(
        "the string should be transformed correctly.",
        BLACK.escapeSequence() + null + BRIGHT_WHITE.escapeSequence(),
        new TerminalColourApplier(BRIGHT_WHITE, BLACK).apply(null, null, null));
  }
  @Test
  public void testApply() {

    final String TEST_STRING = "test_string";

    assertEquals(
        "the string should be transformed correctly.",
        BLACK.escapeSequence() + TEST_STRING + BRIGHT_WHITE.escapeSequence(),
        new TerminalColourApplier(BRIGHT_WHITE, BLACK).apply(null, null, TEST_STRING));
  }
Пример #3
0
  private static String prettyWrap(String string) {

    return BLACK.escapeSequence() + BRIGHT_WHITE.escapeSequence() + string + RESET + '\n';
  }