@Test public void toStringRepresentation() { String actual = new GitItem( ID, TIME_STAMP, AUTHOR, CONTENT ).toString(); assertThat( actual ) .contains( ID ) .contains( String.valueOf( TIME_STAMP ) ) .contains( AUTHOR ) .contains( CONTENT ); }
@Override public String toString() { return "GitItem [content=" + content + ", author=" + author + ", timeStamp=" + timeStamp + ", id=" + id + "]"; }
GitItem extends Item { @Override public String toString() { return "GitItem [content=" + content + ", author=" + author + ", timeStamp=" + timeStamp + ", id=" + id + "]"; } }
GitItem extends Item { @Override public String toString() { return "GitItem [content=" + content + ", author=" + author + ", timeStamp=" + timeStamp + ", id=" + id + "]"; } GitItem( String id, long timeStamp, String author, String content ); }
GitItem extends Item { @Override public String toString() { return "GitItem [content=" + content + ", author=" + author + ", timeStamp=" + timeStamp + ", id=" + id + "]"; } GitItem( String id, long timeStamp, String author, String content ); static GitItem ofCommit( RevCommit commit ); String getAuthor(); String getContent(); @Override String toString(); }
GitItem extends Item { @Override public String toString() { return "GitItem [content=" + content + ", author=" + author + ", timeStamp=" + timeStamp + ", id=" + id + "]"; } GitItem( String id, long timeStamp, String author, String content ); static GitItem ofCommit( RevCommit commit ); String getAuthor(); String getContent(); @Override String toString();  }