@Test @SuppressWarnings("PMD.AvoidDuplicateLiterals") public void javaCode() { MatcherAssert.assertThat( new MethodImpl( new Method( "text", new StickyList<>( new Parameter( "locale", "Locale" ) ), "Text" ), new Argument.Fake("textEncoded") ).java(), Matchers.stringContainsInOrder( new StickyList<>( "public", "Text", "text", "(", "final", "Locale", "locale", ")", "{", "return", "textEncoded", ";", "}" ) ) ); }
public String java() { return new UncheckedText( new FormattedText( "public %s {\n return %s;\n}", this.declaration.java(), this.argument.java() ) ).asString(); }
MethodImpl { public String java() { return new UncheckedText( new FormattedText( "public %s {\n return %s;\n}", this.declaration.java(), this.argument.java() ) ).asString(); } }
MethodImpl { public String java() { return new UncheckedText( new FormattedText( "public %s {\n return %s;\n}", this.declaration.java(), this.argument.java() ) ).asString(); } MethodImpl(final Method dcr, final Argument arg); }
MethodImpl { public String java() { return new UncheckedText( new FormattedText( "public %s {\n return %s;\n}", this.declaration.java(), this.argument.java() ) ).asString(); } MethodImpl(final Method dcr, final Argument arg); String java(); }
MethodImpl { public String java() { return new UncheckedText( new FormattedText( "public %s {\n return %s;\n}", this.declaration.java(), this.argument.java() ) ).asString(); } MethodImpl(final Method dcr, final Argument arg); String java();  }