@Test void shouldEscapeNull() { StringLiteral literal = new StringLiteral(null); assertThat(literal.asString()).isEqualTo("''"); }
@Override public String asString() { final Optional<String> escapedContent = escapeString(getContent()); return String.format(Locale.ENGLISH, QUOTED_LITERAL_FORMAT, escapedContent.orElse("")); }
StringLiteral extends Literal<CharSequence> { @Override public String asString() { final Optional<String> escapedContent = escapeString(getContent()); return String.format(Locale.ENGLISH, QUOTED_LITERAL_FORMAT, escapedContent.orElse("")); } }
StringLiteral extends Literal<CharSequence> { @Override public String asString() { final Optional<String> escapedContent = escapeString(getContent()); return String.format(Locale.ENGLISH, QUOTED_LITERAL_FORMAT, escapedContent.orElse("")); } StringLiteral(CharSequence content); }
StringLiteral extends Literal<CharSequence> { @Override public String asString() { final Optional<String> escapedContent = escapeString(getContent()); return String.format(Locale.ENGLISH, QUOTED_LITERAL_FORMAT, escapedContent.orElse("")); } StringLiteral(CharSequence content); @Override String asString(); }
StringLiteral extends Literal<CharSequence> { @Override public String asString() { final Optional<String> escapedContent = escapeString(getContent()); return String.format(Locale.ENGLISH, QUOTED_LITERAL_FORMAT, escapedContent.orElse("")); } StringLiteral(CharSequence content); @Override String asString();  }