@Test public void an_argument_error_with_adoc_colon_in_string_results_in_last_message_only() { String message = "(ArgumentError) asciidoctor: FAILED: C:/develop/projects/JCUP/eclipse-asciidoctor-editor/asciidoctor-editor-other/testscripts/17.failure_asciidocfile_not_utf_8_but_umlauts.adoc: Failed to load AsciiDoc document - invalid byte sequence in UTF-8"; AsciiDoctorMarker error = builderToTest.build(message); assertNotNull(error); assertEquals(-1, error.getStart()); assertEquals(-1, error.getEnd()); assertEquals(Type.ERROR, error.getType()); assertEquals("Failed to load AsciiDoc document - invalid byte sequence in UTF-8", 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);  }