@Test public void testCreateSubcommunityAuth() throws Exception { doNothing().when(authorizeServiceSpy).authorizeAction(context, c, Constants.ADD); when(authorizeServiceSpy.authorizeActionBoolean(context, c, Constants.ADD)).thenReturn(true); Community result = communityService.createSubcommunity(context, c); assertThat("testCreateSubcommunityAuth 0", c.getSubcommunities(), notNullValue()); assertTrue("testCreateSubcommunityAuth 1", c.getSubcommunities().size() == 1); assertThat("testCreateSubcommunityAuth 2", c.getSubcommunities().get(0), equalTo(result)); }
public List<Community> getSubcommunities() { Community[] output = subCommunities.toArray(new Community[] {}); Arrays.sort(output, new NameAscendingComparator()); return Arrays.asList(output); }
Community extends DSpaceObject implements DSpaceObjectLegacySupport { public List<Community> getSubcommunities() { Community[] output = subCommunities.toArray(new Community[] {}); Arrays.sort(output, new NameAscendingComparator()); return Arrays.asList(output); } }
Community extends DSpaceObject implements DSpaceObjectLegacySupport { public List<Community> getSubcommunities() { Community[] output = subCommunities.toArray(new Community[] {}); Arrays.sort(output, new NameAscendingComparator()); return Arrays.asList(output); } protected  Community(); }
Community extends DSpaceObject implements DSpaceObjectLegacySupport { public List<Community> getSubcommunities() { Community[] output = subCommunities.toArray(new Community[] {}); Arrays.sort(output, new NameAscendingComparator()); return Arrays.asList(output); } protected  Community(); void removeSubCommunity(Community subCommunity); Bitstream getLogo(); Group getAdministrators(); List<Collection> getCollections(); List<Community> getSubcommunities(); List<Community> getParentCommunities(); void removeParentCommunity(Community parentCommunity); @Override boolean equals(Object other); @Override int hashCode(); @Override int getType(); @Override String getName(); @Override Integer getLegacyId(); }
Community extends DSpaceObject implements DSpaceObjectLegacySupport { public List<Community> getSubcommunities() { Community[] output = subCommunities.toArray(new Community[] {}); Arrays.sort(output, new NameAscendingComparator()); return Arrays.asList(output); } protected  Community(); void removeSubCommunity(Community subCommunity); Bitstream getLogo(); Group getAdministrators(); List<Collection> getCollections(); List<Community> getSubcommunities(); List<Community> getParentCommunities(); void removeParentCommunity(Community parentCommunity); @Override boolean equals(Object other); @Override int hashCode(); @Override int getType(); @Override String getName(); @Override Integer getLegacyId(); static final String COPYRIGHT_TEXT; static final String INTRODUCTORY_TEXT; static final String SHORT_DESCRIPTION; static final String SIDEBAR_TEXT; }