@Test public void testGetMacroNamesForCategory() throws Exception { final Macro testMacro1 = registerMockComponent(Macro.class, "mytestmacro1", "mock1"); final Macro testMacro2 = registerMockComponent(Macro.class, "mytestmacro2", "mock2"); getMockery().checking(new Expectations(){{ allowing(testMacro1).getDescriptor(); will(returnValue(new DefaultMacroDescriptor(new MacroId("macro1"), "Test macro - 1"))); allowing(testMacro2).getDescriptor(); will(returnValue(new DefaultMacroDescriptor(new MacroId("macro2"), "Test macro - 2"))); }}); DefaultMacroTransformationConfiguration configuration = (DefaultMacroTransformationConfiguration) getComponentManager().getInstance( MacroTransformationConfiguration.class); configuration.addCategory(new MacroId("mytestmacro1"), "Cat1"); configuration.addCategory(new MacroId("mytestmacro2"), "Cat2"); Set<MacroId> macroIds = this.macroCategoryManager.getMacroIds("Cat1"); Assert.assertTrue(macroIds.contains(new MacroId("mytestmacro1"))); Assert.assertFalse(macroIds.contains(new MacroId("mytestmacro2"))); macroIds = this.macroCategoryManager.getMacroIds("Cat1", Syntax.JSPWIKI_1_0); Assert.assertTrue(macroIds.contains(new MacroId("mytestmacro1"))); getComponentManager().unregisterComponent(Macro.class, "mytestmacro1"); getComponentManager().unregisterComponent(Macro.class, "mytestmacro2"); }
@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);  }