@Test public void writing_response_is_formatted_correctly() throws IOException { this.strategy.writeCreated(this.appendable, this.request, this.response); assertEquals("Created: response\n", this.appendable.toString()); }
public void writeCreated(Appendable appendable, Object request, Object specimen) throws IOException { appendable.append(StringUtil.repeat("\t", --depth)); if(specimen == null) { appendable.append("Created: ").append("null instance"); } else { appendable.append("Created: ").append(specimen.toString()); } appendable.append("\n"); }
DebugTracingStrategy implements TracingStrategy { public void writeCreated(Appendable appendable, Object request, Object specimen) throws IOException { appendable.append(StringUtil.repeat("\t", --depth)); if(specimen == null) { appendable.append("Created: ").append("null instance"); } else { appendable.append("Created: ").append(specimen.toString()); } appendable.append("\n"); } }
DebugTracingStrategy implements TracingStrategy { public void writeCreated(Appendable appendable, Object request, Object specimen) throws IOException { appendable.append(StringUtil.repeat("\t", --depth)); if(specimen == null) { appendable.append("Created: ").append("null instance"); } else { appendable.append("Created: ").append(specimen.toString()); } appendable.append("\n"); }  }
DebugTracingStrategy implements TracingStrategy { public void writeCreated(Appendable appendable, Object request, Object specimen) throws IOException { appendable.append(StringUtil.repeat("\t", --depth)); if(specimen == null) { appendable.append("Created: ").append("null instance"); } else { appendable.append("Created: ").append(specimen.toString()); } appendable.append("\n"); }  void writeRequest(Appendable appendable, Object request); void writeCreated(Appendable appendable, Object request, Object specimen); @Override void writeError(Appendable appendable, Exception exception); }
DebugTracingStrategy implements TracingStrategy { public void writeCreated(Appendable appendable, Object request, Object specimen) throws IOException { appendable.append(StringUtil.repeat("\t", --depth)); if(specimen == null) { appendable.append("Created: ").append("null instance"); } else { appendable.append("Created: ").append(specimen.toString()); } appendable.append("\n"); }  void writeRequest(Appendable appendable, Object request); void writeCreated(Appendable appendable, Object request, Object specimen); @Override void writeError(Appendable appendable, Exception exception);  }