@Test public void even_a_null_message_results_in_error() { String message = null; AsciiDoctorMarker error = builderToTest.build(message); assertNotNull(error); assertEquals(-1, error.getStart()); assertEquals(-1, error.getEnd()); assertEquals(Type.ERROR, error.getType()); assertEquals("Unknown failure", error.getMessage()); }
public AsciiDoctorMarker build(String originMessage){ int start=-1; int end=-1; String message = null; if (originMessage==null){ message="Unknown failure"; }else{ message = handleNotNullMessages(originMessage); } if (message==null){ message = originMessage; } AsciiDoctorMarker error = new AsciiDoctorMarker(start, end, message.trim()); return error; }
AsciiDoctorErrorBuilder { public AsciiDoctorMarker build(String originMessage){ int start=-1; int end=-1; String message = null; if (originMessage==null){ message="Unknown failure"; }else{ message = handleNotNullMessages(originMessage); } if (message==null){ message = originMessage; } AsciiDoctorMarker error = new AsciiDoctorMarker(start, end, message.trim()); return error; } }
AsciiDoctorErrorBuilder { public AsciiDoctorMarker build(String originMessage){ int start=-1; int end=-1; String message = null; if (originMessage==null){ message="Unknown failure"; }else{ message = handleNotNullMessages(originMessage); } if (message==null){ message = originMessage; } AsciiDoctorMarker error = new AsciiDoctorMarker(start, end, message.trim()); return error; }  }
AsciiDoctorErrorBuilder { public AsciiDoctorMarker build(String originMessage){ int start=-1; int end=-1; String message = null; if (originMessage==null){ message="Unknown failure"; }else{ message = handleNotNullMessages(originMessage); } if (message==null){ message = originMessage; } AsciiDoctorMarker error = new AsciiDoctorMarker(start, end, message.trim()); return error; }  AsciiDoctorMarker build(String originMessage); }
AsciiDoctorErrorBuilder { public AsciiDoctorMarker build(String originMessage){ int start=-1; int end=-1; String message = null; if (originMessage==null){ message="Unknown failure"; }else{ message = handleNotNullMessages(originMessage); } if (message==null){ message = originMessage; } AsciiDoctorMarker error = new AsciiDoctorMarker(start, end, message.trim()); return error; }  AsciiDoctorMarker build(String originMessage);  }