@Test public void parseHeadingSpecialCases() throws IOException { WikiVisitor visitor = EasyMock.createStrictMock(WikiVisitor.class); visitor.startPara(0); EasyMock.expectLastCall(); visitor.heading(1, ""); visitor.endPara(); visitor.startPara(0); visitor.text("hf."); visitor.endPara(); EasyMock.replay(visitor); WikiParser parser = new WikiParser(visitor); parser.parse(new StringReader(HEADINGCASES)); EasyMock.verify(visitor); }
public void parse(Reader reader) throws IOException { BufferedReader br = new BufferedReader(reader); String line; while ((line = br.readLine()) != null) { if (!line.startsWith("#")) { parse(line); } } }
WikiParser { public void parse(Reader reader) throws IOException { BufferedReader br = new BufferedReader(reader); String line; while ((line = br.readLine()) != null) { if (!line.startsWith("#")) { parse(line); } } } }
WikiParser { public void parse(Reader reader) throws IOException { BufferedReader br = new BufferedReader(reader); String line; while ((line = br.readLine()) != null) { if (!line.startsWith("#")) { parse(line); } } } WikiParser(WikiVisitor visitor); }
WikiParser { public void parse(Reader reader) throws IOException { BufferedReader br = new BufferedReader(reader); String line; while ((line = br.readLine()) != null) { if (!line.startsWith("#")) { parse(line); } } } WikiParser(WikiVisitor visitor); void parse(Reader reader); void parse(String line); }
WikiParser { public void parse(Reader reader) throws IOException { BufferedReader br = new BufferedReader(reader); String line; while ((line = br.readLine()) != null) { if (!line.startsWith("#")) { parse(line); } } } WikiParser(WikiVisitor visitor); void parse(Reader reader); void parse(String line);  }