@Test public void renderIcon() throws Exception { IconSet iconSet = new IconSet("iconSet"); iconSet.addIcon("test", new Icon("hello")); when(velocityRenderer.render("#set($icon = \"hello\")\nfa fa-$icon")).thenReturn("fa fa-hello"); String renderedIcon1 = iconRenderer.render("test", iconSet, "fa fa-$icon"); String renderedIcon2 = iconRenderer.render("none", iconSet, "fa fa-$icon"); String renderedIcon3 = iconRenderer.render("none", null, "fa fa-$icon"); String renderedIcon4 = iconRenderer.render("none", iconSet, null); assertEquals("fa fa-hello", renderedIcon1); assertEquals("", renderedIcon2); assertEquals("", renderedIcon3); assertEquals("", renderedIcon4); }
@Override public String render(String iconName, IconSet iconSet) throws IconException { return render(iconName, iconSet, iconSet.getRenderWiki()); }
DefaultIconRenderer implements IconRenderer { @Override public String render(String iconName, IconSet iconSet) throws IconException { return render(iconName, iconSet, iconSet.getRenderWiki()); } }
DefaultIconRenderer implements IconRenderer { @Override public String render(String iconName, IconSet iconSet) throws IconException { return render(iconName, iconSet, iconSet.getRenderWiki()); }  }
DefaultIconRenderer implements IconRenderer { @Override public String render(String iconName, IconSet iconSet) throws IconException { return render(iconName, iconSet, iconSet.getRenderWiki()); }  @Override String render(String iconName, IconSet iconSet); @Override String renderHTML(String iconName, IconSet iconSet); @Override String render(String iconName, IconSet iconSet, String renderer); @Override void use(IconSet iconSet); }
DefaultIconRenderer implements IconRenderer { @Override public String render(String iconName, IconSet iconSet) throws IconException { return render(iconName, iconSet, iconSet.getRenderWiki()); }  @Override String render(String iconName, IconSet iconSet); @Override String renderHTML(String iconName, IconSet iconSet); @Override String render(String iconName, IconSet iconSet, String renderer); @Override void use(IconSet iconSet);  }