@Test public void testParsePrecedingOpenParenthesis() { final String subroutineDefinition = "(subroutine preceding_parenthesis("; InvalidSubroutineException e = assertThrows(InvalidSubroutineException.class, () -> { parser.parse(subroutineDefinition); }); assertThat(e.getMessage()) .isEqualTo("Opening parenthesis precedes the subroutine keyword: " + subroutineDefinition); }
public SubroutineDefinition parse(final String subroutineDefinition) { if (subroutineDefinition == null) { throw new IllegalArgumentException("Subroutine definition cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(String)"); try { return new SubroutineDefinition(parseSubroutineName(subroutineDefinition), parseArgumentNames(subroutineDefinition)); } finally { point.collect(); } }
SubroutineDefinitionParser { public SubroutineDefinition parse(final String subroutineDefinition) { if (subroutineDefinition == null) { throw new IllegalArgumentException("Subroutine definition cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(String)"); try { return new SubroutineDefinition(parseSubroutineName(subroutineDefinition), parseArgumentNames(subroutineDefinition)); } finally { point.collect(); } } }
SubroutineDefinitionParser { public SubroutineDefinition parse(final String subroutineDefinition) { if (subroutineDefinition == null) { throw new IllegalArgumentException("Subroutine definition cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(String)"); try { return new SubroutineDefinition(parseSubroutineName(subroutineDefinition), parseArgumentNames(subroutineDefinition)); } finally { point.collect(); } }  }
SubroutineDefinitionParser { public SubroutineDefinition parse(final String subroutineDefinition) { if (subroutineDefinition == null) { throw new IllegalArgumentException("Subroutine definition cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(String)"); try { return new SubroutineDefinition(parseSubroutineName(subroutineDefinition), parseArgumentNames(subroutineDefinition)); } finally { point.collect(); } }  SubroutineDefinition parse(final String subroutineDefinition); }
SubroutineDefinitionParser { public SubroutineDefinition parse(final String subroutineDefinition) { if (subroutineDefinition == null) { throw new IllegalArgumentException("Subroutine definition cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(String)"); try { return new SubroutineDefinition(parseSubroutineName(subroutineDefinition), parseArgumentNames(subroutineDefinition)); } finally { point.collect(); } }  SubroutineDefinition parse(final String subroutineDefinition);  }