Ignore:
Timestamp:
08/11/14 16:07:55 (10 years ago)
Author:
olhsha@mpi.nl
Message:

Added group service. Tested via the tomcat on loclahots (test URI and postman), old unit tests are adjusted and work well. Todo: retest on localhost tomcat, look at run-time exceptions, add new unit tests, adjust front-end

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ComponentRegistry/trunk/ComponentRegistry/src/test/java/clarin/cmdi/componentregistry/impl/database/GroupServiceImplTest.java

    r4098 r5549  
    88
    99import clarin.cmdi.componentregistry.BaseUnitTest;
     10import clarin.cmdi.componentregistry.UserUnauthorizedException;
    1011import clarin.cmdi.componentregistry.model.BaseDescription;
    1112import clarin.cmdi.componentregistry.model.ComponentDescription;
    1213import clarin.cmdi.componentregistry.model.Group;
    13 import clarin.cmdi.componentregistry.model.GroupMembership;
    1414import clarin.cmdi.componentregistry.model.Ownership;
    1515import clarin.cmdi.componentregistry.model.ProfileDescription;
     
    4747        profile.setId(ProfileDescription.PROFILE_PREFIX+sid);
    4848        profile.setName("profilename");
     49        profile.setCreatorName(DummyPrincipal.DUMMY_PRINCIPAL.getName());
    4950        Number id = componentDescriptionDao.insertDescription(profile, "someContent",
    5051                isPublic, ownerId);
     
    5859        componentDescription.setId(ComponentDescription.COMPONENT_PREFIX+"4567");
    5960        componentDescription.setName("componentname");
     61        componentDescription.setCreatorName(DummyPrincipal.DUMMY_PRINCIPAL.getName());
    6062        Number id = componentDescriptionDao.insertDescription(
    6163                componentDescription, "someContent", isPublic, ownerId);
     
    255257
    256258    @Test
    257     public void testTransferComponentOwnershipFromUserToGroup() {
     259    public void testTransferComponentOwnershipFromUserToGroup()  throws UserUnauthorizedException{
    258260
    259261        // Make a group
     
    307309
    308310    @Test
    309     public void testtransferComponentOwnershipFromUserToGroup() {
     311    public void testtransferComponentOwnershipFromUserToGroup()  throws UserUnauthorizedException{
    310312
    311313        // Make a group
     
    360362
    361363    @Test
    362     public void testTransferItemOwnershipFromUserToGroup() {
     364    public void testTransferItemOwnershipFromUserToGroup()  throws UserUnauthorizedException{
    363365        //TODO: improve test by mixing in components and exclusing components/profiles
    364366        // Make a group
     
    413415
    414416    @Test
    415     public void testGetGroupsTheItemIsAMemberOf() {
     417    public void testGetGroupsTheItemIsAMemberOf()  throws UserUnauthorizedException{
    416418        // Make a group
    417419        Group group1 = groupDao.findOne(groupService.createNewGroup("Group 1",
Note: See TracChangeset for help on using the changeset viewer.