@Test public void testToPrettyString() { final int testErrCode = 1001; final String testErrorMsg = "Test Error Msg, adfg-asdfk $ %, \n"; BriefError briefError = new BriefError(testErrCode, testErrorMsg); final String actualPrettyString = briefError.toPrettyString(); final String expectedPrettyString = "Error Code: 1001\nError Message: Test Error Msg, adfg-asdfk $ %, \n"; assertEquals(actualPrettyString, expectedPrettyString); }
@Override public String toPrettyString() { StringBuilder sb = new StringBuilder("Error Code: ").append(this.errorCode).append("\n").append("Error Message: ") .append(this.errorMsg); return sb.toString(); }
BriefError implements PrettyPrintable { @Override public String toPrettyString() { StringBuilder sb = new StringBuilder("Error Code: ").append(this.errorCode).append("\n").append("Error Message: ") .append(this.errorMsg); return sb.toString(); } }
BriefError implements PrettyPrintable { @Override public String toPrettyString() { StringBuilder sb = new StringBuilder("Error Code: ").append(this.errorCode).append("\n").append("Error Message: ") .append(this.errorMsg); return sb.toString(); } BriefError(final int errorCode, final String errorMsg); }
BriefError implements PrettyPrintable { @Override public String toPrettyString() { StringBuilder sb = new StringBuilder("Error Code: ").append(this.errorCode).append("\n").append("Error Message: ") .append(this.errorMsg); return sb.toString(); } BriefError(final int errorCode, final String errorMsg); @Override String toPrettyString(); }
BriefError implements PrettyPrintable { @Override public String toPrettyString() { StringBuilder sb = new StringBuilder("Error Code: ").append(this.errorCode).append("\n").append("Error Message: ") .append(this.errorMsg); return sb.toString(); } BriefError(final int errorCode, final String errorMsg); @Override String toPrettyString();  }