@Test public void testCreateAuth2() throws Exception { when(authorizeServiceSpy.isAdmin(context)).thenReturn(true); Community created = communityService.create(null, context); assertThat("testCreate 0", created, notNullValue()); assertThat("testCreate 1", created.getName(), equalTo("")); Community son = communityService.create(created, context); assertThat("testCreate 2", son, notNullValue()); assertThat("testCreate 3", son.getName(), equalTo("")); assertTrue("testCreate 4", communityService.getAllParents(context, son).size() == 1); assertThat("testCreate 5", communityService.getAllParents(context, son).get(0), equalTo(created)); }
@Override public String getName() { String value = getCommunityService() .getMetadataFirstValue(this, MetadataSchemaEnum.DC.getName(), "title", null, Item.ANY); return value == null ? "" : value; }
Community extends DSpaceObject implements DSpaceObjectLegacySupport { @Override public String getName() { String value = getCommunityService() .getMetadataFirstValue(this, MetadataSchemaEnum.DC.getName(), "title", null, Item.ANY); return value == null ? "" : value; } }
Community extends DSpaceObject implements DSpaceObjectLegacySupport { @Override public String getName() { String value = getCommunityService() .getMetadataFirstValue(this, MetadataSchemaEnum.DC.getName(), "title", null, Item.ANY); return value == null ? "" : value; } protected  Community(); }
Community extends DSpaceObject implements DSpaceObjectLegacySupport { @Override public String getName() { String value = getCommunityService() .getMetadataFirstValue(this, MetadataSchemaEnum.DC.getName(), "title", null, Item.ANY); return value == null ? "" : value; } 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 { @Override public String getName() { String value = getCommunityService() .getMetadataFirstValue(this, MetadataSchemaEnum.DC.getName(), "title", null, Item.ANY); return value == null ? "" : value; } 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; }