@Test public void testGetGroupMappingsWithTwoCouples() throws Exception { this.mockery.checking(new Expectations() {{ allowing(xwikiMock).getXWikiPreference("puma_groupsMapping", getContext()); will(returnValue("xwikigroup=pumagroup|xwikigroup2=pumagroup2")); }}); Map<String, Collection<String>> groupMapping = this.config.getGroupMapping(getContext()); Assert.assertEquals(new HashSet<String>(Arrays.asList("xwikigroup")), groupMapping.get("pumagroup")); Assert.assertEquals(new HashSet<String>(Arrays.asList("xwikigroup2")), groupMapping.get("pumagroup2")); }
public Map<String, Collection<String>> getGroupMapping(XWikiContext context) { return getOneToManyParam("groupsMapping", '|', null, false, context); }
PUMAConfig extends Config { public Map<String, Collection<String>> getGroupMapping(XWikiContext context) { return getOneToManyParam("groupsMapping", '|', null, false, context); } }
PUMAConfig extends Config { public Map<String, Collection<String>> getGroupMapping(XWikiContext context) { return getOneToManyParam("groupsMapping", '|', null, false, context); } PUMAConfig(); }
PUMAConfig extends Config { public Map<String, Collection<String>> getGroupMapping(XWikiContext context) { return getOneToManyParam("groupsMapping", '|', null, false, context); } PUMAConfig(); String getUserUidField(XWikiContext context); Map<String, String> getUserMapping(XWikiContext context); Map<String, Collection<String>> getGroupMapping(XWikiContext context); XWikiAuthService getFallbackAuthenticator(XWikiContext context); }
PUMAConfig extends Config { public Map<String, Collection<String>> getGroupMapping(XWikiContext context) { return getOneToManyParam("groupsMapping", '|', null, false, context); } PUMAConfig(); String getUserUidField(XWikiContext context); Map<String, String> getUserMapping(XWikiContext context); Map<String, Collection<String>> getGroupMapping(XWikiContext context); XWikiAuthService getFallbackAuthenticator(XWikiContext context);  }