@Test public void removeTags3() { String comment = " @author <a href=\"http://tfox.org\">Tim Fox</a>\n" + " @version 12.2\n" + " @see io.vertx.codegen.testmodel.TestInterface\n"; String removed = Helper.removeTags(comment); String removedExpected = ""; assertEquals(removedExpected, removed); } @Test
@Test public void removeTags4() { String comment = "X\n" + " @author <a href=\"http://tfox.org\">Tim Fox</a>\n" + " @version 12.2\n" + " @see io.vertx.codegen.testmodel.TestInterface\n"; String removed = Helper.removeTags(comment); String removedExpected = "X"; assertEquals(removedExpected, removed); }
@Test public void removeTags2() { String comment = " @author <a href=\"http://tfox.org\">Tim Fox</a>\n" + " @version 12.2\n" + " @see io.vertx.codegen.testmodel.TestInterface\n"; String removed = Helper.removeTags(comment); String removedExpected = ""; assertEquals(removedExpected, removed); }
@Test public void removeTags1() { String comment = " Interface comment line 1\n" + " Interface comment line 2\n" + " Interface comment line 3\n\n" + " @author <a href=\"http://tfox.org\">Tim Fox</a>\n" + " @version 12.2\n" + " @see io.vertx.codegen.testmodel.TestInterface\n"; String removed = Helper.removeTags(comment); String removedExpected = " Interface comment line 1\n" + " Interface comment line 2\n" + " Interface comment line 3\n"; assertEquals(removedExpected, removed); }
protected void genDoc(M model, CodeWriter writer) { writer.println("/**"); if (model.getIfaceComment() != null) { writer.println(Helper.removeTags(model.getIfaceComment())); } writer.println(" @class"); writer.println("*/"); } protected String unwrapToJava(MethodInfo method, ParamInfo param, TypeInfo unwrappedType, String unwrappedName) {