@Test public void whenParseLinkThenResultTopicID() { String result = pj.parseTopicId("http: String expected = "1249811"; assertEquals(result, expected); }
public String parseTopicId(String line) { String result = ""; Pattern p = Pattern.compile("forum/(\\d+)"); Matcher m = p.matcher(line); while (m.find()) { result = m.group(1); } return result; }
ParserJsoup { public String parseTopicId(String line) { String result = ""; Pattern p = Pattern.compile("forum/(\\d+)"); Matcher m = p.matcher(line); while (m.find()) { result = m.group(1); } return result; } }
ParserJsoup { public String parseTopicId(String line) { String result = ""; Pattern p = Pattern.compile("forum/(\\d+)"); Matcher m = p.matcher(line); while (m.find()) { result = m.group(1); } return result; }  }
ParserJsoup { public String parseTopicId(String line) { String result = ""; Pattern p = Pattern.compile("forum/(\\d+)"); Matcher m = p.matcher(line); while (m.find()) { result = m.group(1); } return result; }  void start(DBManager db); String parseTopicId(String line); Timestamp parseDate(String date); }
ParserJsoup { public String parseTopicId(String line) { String result = ""; Pattern p = Pattern.compile("forum/(\\d+)"); Matcher m = p.matcher(line); while (m.find()) { result = m.group(1); } return result; }  void start(DBManager db); String parseTopicId(String line); Timestamp parseDate(String date);  }