Paragraph extends Job implements Serializable, Cloneable { public String getScriptBody() { return getScriptBody(null != effectiveText ? effectiveText : text); } @VisibleForTesting  Paragraph();  Paragraph(String paragraphId, Note note, JobListener listener,
                   NoteInterpreterLoader replLoader);  Paragraph(Note note, JobListener listener, NoteInterpreterLoader replLoader); String getText(); void setText(String newText); void setEffectiveText(String effectiveText); String getEffectiveText(); AuthenticationInfo getAuthenticationInfo(); void setAuthenticationInfo(AuthenticationInfo authenticationInfo); String getTitle(); void setTitle(String title); void setNote(Note note); Note getNote(); boolean isEnabled(); String getRequiredReplName(); static String getRequiredReplName(String text); String getScriptBody(); static String getScriptBody(String text); NoteInterpreterLoader getNoteReplLoader(); Interpreter getRepl(String name); Interpreter getCurrentRepl(); List<InterpreterCompletion> completion(String buffer, int cursor); void setNoteReplLoader(NoteInterpreterLoader repls); InterpreterResult getResult(); @Override int progress(); @Override Map<String, Object> info(); Map<String, Object> getConfig(); void setConfig(Map<String, Object> config); void setReturn(InterpreterResult value, Throwable t); @Override Object clone(); final GUI settings; }
@Test public void scriptBodyWithReplName() { String text = "%spark(1234567"; assertEquals("(1234567", Paragraph.getScriptBody(text)); text = "%table 1234567"; assertEquals("1234567", Paragraph.getScriptBody(text)); }
@Test public void scriptBodyWithoutReplName() { String text = "12345678"; assertEquals(text, Paragraph.getScriptBody(text)); }