@Test public void testRemoveLicensesAuth() throws Exception { context.turnOffAuthorisationSystem(); String name = "LICENSE"; Bundle created = bundleService.create(context, it, name); created.setName(context, name); String bsname = "License"; File f = new File(testProps.get("test.bitstream").toString()); Bitstream result = itemService.createSingleBitstream(context, new FileInputStream(f), it, bsname); bitstreamService.setFormat(context, result, bitstreamFormatService.findByShortDescription(context, bsname)); bundleService.addBitstream(context, created, result); context.restoreAuthSystemState(); doNothing().when(authorizeServiceSpy).authorizeAction(context, it, Constants.REMOVE); doNothing().when(authorizeServiceSpy).authorizeAction(context, it, Constants.WRITE); doNothing().when(authorizeServiceSpy).authorizeAction(context, created, Constants.REMOVE); doNothing().when(authorizeServiceSpy).authorizeAction(context, created, Constants.DELETE); doNothing().when(authorizeServiceSpy).authorizeAction(context, result, Constants.DELETE); itemService.removeLicenses(context, it); assertThat("testRemoveLicensesAuth 0", itemService.getBundles(it, name), notNullValue()); assertTrue("testRemoveLicensesAuth 1", itemService.getBundles(it, name).size() == 0); }
public List<Bundle> getBundles() { return bundles; }
Item extends DSpaceObject implements DSpaceObjectLegacySupport { public List<Bundle> getBundles() { return bundles; } }
Item extends DSpaceObject implements DSpaceObjectLegacySupport { public List<Bundle> getBundles() { return bundles; } protected  Item(); }
Item extends DSpaceObject implements DSpaceObjectLegacySupport { public List<Bundle> getBundles() { return bundles; } protected  Item(); boolean isArchived(); boolean isWithdrawn(); boolean isDiscoverable(); Date getLastModified(); void setLastModified(Date lastModified); void setArchived(boolean isArchived); void setDiscoverable(boolean discoverable); void setOwningCollection(Collection c); Collection getOwningCollection(); EPerson getSubmitter(); void setSubmitter(EPerson sub); List<Collection> getCollections(); void clearCollections(); Collection getTemplateItemOf(); List<Bundle> getBundles(); List<Bundle> getBundles(String name); @Override boolean equals(Object obj); @Override int hashCode(); @Override int getType(); @Override String getName(); @Override Integer getLegacyId(); ItemService getItemService(); }
Item extends DSpaceObject implements DSpaceObjectLegacySupport { public List<Bundle> getBundles() { return bundles; } protected  Item(); boolean isArchived(); boolean isWithdrawn(); boolean isDiscoverable(); Date getLastModified(); void setLastModified(Date lastModified); void setArchived(boolean isArchived); void setDiscoverable(boolean discoverable); void setOwningCollection(Collection c); Collection getOwningCollection(); EPerson getSubmitter(); void setSubmitter(EPerson sub); List<Collection> getCollections(); void clearCollections(); Collection getTemplateItemOf(); List<Bundle> getBundles(); List<Bundle> getBundles(String name); @Override boolean equals(Object obj); @Override int hashCode(); @Override int getType(); @Override String getName(); @Override Integer getLegacyId(); ItemService getItemService(); static final String ANY; }