@Test public void testGetMacroIdsWithSyntaxSpecificMacros() throws Exception { final Macro mockMacro = registerMockComponent(Macro.class, "mytestmacro/xwiki/2.0"); getMockery().checking(new Expectations(){{ allowing(mockMacro).getDescriptor(); will(returnValue(new DefaultMacroDescriptor(new MacroId("test"), "Test macro"))); }}); DefaultMacroTransformationConfiguration configuration = (DefaultMacroTransformationConfiguration) getComponentManager().getInstance( MacroTransformationConfiguration.class); configuration.addCategory(new MacroId("mytestmacro", Syntax.XWIKI_2_0), "Test"); Set<MacroId> macroIds = this.macroCategoryManager.getMacroIds("Test"); Assert.assertTrue(macroIds.contains(new MacroId("mytestmacro", Syntax.XWIKI_2_0))); macroIds = this.macroCategoryManager.getMacroIds("Test", Syntax.XWIKI_2_0); Assert.assertTrue(macroIds.contains(new MacroId("mytestmacro", Syntax.XWIKI_2_0))); macroIds = this.macroCategoryManager.getMacroIds("Test", Syntax.JSPWIKI_1_0); Assert.assertFalse(macroIds.contains(new MacroId("mytestmacro"))); getComponentManager().unregisterComponent(Macro.class, "mytestmacro/xwiki/2.0"); }
@Override public Set<MacroId> getMacroIds(String category) throws MacroLookupException { return getMacroIds(category, null); }
DefaultMacroCategoryManager implements MacroCategoryManager { @Override public Set<MacroId> getMacroIds(String category) throws MacroLookupException { return getMacroIds(category, null); } }
DefaultMacroCategoryManager implements MacroCategoryManager { @Override public Set<MacroId> getMacroIds(String category) throws MacroLookupException { return getMacroIds(category, null); }  }
DefaultMacroCategoryManager implements MacroCategoryManager { @Override public Set<MacroId> getMacroIds(String category) throws MacroLookupException { return getMacroIds(category, null); }  @Override Set<String> getMacroCategories(); @Override Set<String> getMacroCategories(final Syntax syntax); @Override Set<MacroId> getMacroIds(String category); @Override Set<MacroId> getMacroIds(String category, final Syntax syntax); }
DefaultMacroCategoryManager implements MacroCategoryManager { @Override public Set<MacroId> getMacroIds(String category) throws MacroLookupException { return getMacroIds(category, null); }  @Override Set<String> getMacroCategories(); @Override Set<String> getMacroCategories(final Syntax syntax); @Override Set<MacroId> getMacroIds(String category); @Override Set<MacroId> getMacroIds(String category, final Syntax syntax);  }