@Test void onMacroMention() { Map<String, String> parameters = new HashMap<>(); parameters.put("reference", "xwiki:XWiki.User"); parameters.put("style", FULL_NAME.toString()); this.renderer.setPrinter(new DefaultWikiPrinter()); this.renderer.onMacro("mention", parameters, "", false); verify(this.formatter).formatMention("xwiki:XWiki.User", FULL_NAME); }
@Override public void onMacro(String id, Map<String, String> parameters, String contentP, boolean inline) { String userReference = parameters.get("reference"); String style = parameters.get("style"); if (Objects.equals(id, "mention")) { this.getPrinter().println(this.formatter.formatMention(userReference, DisplayStyle.valueOf(style))); } else { super.onMacro(id, parameters, contentP, inline); } }
PlainTextMentionsRenderer extends PlainTextRenderer implements Initializable { @Override public void onMacro(String id, Map<String, String> parameters, String contentP, boolean inline) { String userReference = parameters.get("reference"); String style = parameters.get("style"); if (Objects.equals(id, "mention")) { this.getPrinter().println(this.formatter.formatMention(userReference, DisplayStyle.valueOf(style))); } else { super.onMacro(id, parameters, contentP, inline); } } }
PlainTextMentionsRenderer extends PlainTextRenderer implements Initializable { @Override public void onMacro(String id, Map<String, String> parameters, String contentP, boolean inline) { String userReference = parameters.get("reference"); String style = parameters.get("style"); if (Objects.equals(id, "mention")) { this.getPrinter().println(this.formatter.formatMention(userReference, DisplayStyle.valueOf(style))); } else { super.onMacro(id, parameters, contentP, inline); } }  }
PlainTextMentionsRenderer extends PlainTextRenderer implements Initializable { @Override public void onMacro(String id, Map<String, String> parameters, String contentP, boolean inline) { String userReference = parameters.get("reference"); String style = parameters.get("style"); if (Objects.equals(id, "mention")) { this.getPrinter().println(this.formatter.formatMention(userReference, DisplayStyle.valueOf(style))); } else { super.onMacro(id, parameters, contentP, inline); } }  @Override void onMacro(String id, Map<String, String> parameters, String contentP, boolean inline); }
PlainTextMentionsRenderer extends PlainTextRenderer implements Initializable { @Override public void onMacro(String id, Map<String, String> parameters, String contentP, boolean inline) { String userReference = parameters.get("reference"); String style = parameters.get("style"); if (Objects.equals(id, "mention")) { this.getPrinter().println(this.formatter.formatMention(userReference, DisplayStyle.valueOf(style))); } else { super.onMacro(id, parameters, contentP, inline); } }  @Override void onMacro(String id, Map<String, String> parameters, String contentP, boolean inline);  }