Package org.openengsb.domain.userprojects.model

Examples of org.openengsb.domain.userprojects.model.Permission


    }

    @Test
    public void testUpdatePermissions_shouldCreatePermission() throws LdapInvalidAttributeValueException,
        NoSuchNodeException, MissingParentException {
        Permission permission = createTestPermission();
        ldapService.updatePermissions(Lists.newArrayList(permission));
        assertThat(ldapDao.exists(DnFactory.permission(permission)), is(true));
        assertCorrectlyStored(permission);
    }
View Full Code Here


        assertThat(ldapDao.exists(DnFactory.permission(permission)), is(true));
        assertCorrectlyStored(permission);
    }

    private Permission createTestPermission() {
        return new Permission("comp", "read");
    }
View Full Code Here

    }

    @Test
    public void testUpdatePermissions_shouldUpdatePermission() throws LdapInvalidAttributeValueException,
        NoSuchNodeException, MissingParentException {
        Permission permission = createTestPermission();
        ldapService.updatePermissions(Lists.newArrayList(permission));
        permission.setComponentName(permission.getComponentName() + "new");
        permission.setAction(permission.getAction() + "new");
        ldapService.updatePermissions(Lists.newArrayList(permission));
        assertCorrectlyStored(permission);
    }
View Full Code Here

        assertThat(ldapDao.exists(dn), is(false));
    }

    @Test
    public void testDeletePermissions_shouldDelete() {
        Permission permission = createTestPermission();
        List<Permission> list = Lists.newArrayList(permission);
        ldapService.updatePermissions(list);
        Dn dn = DnFactory.permission(permission);
        assertThat(ldapDao.exists(dn), is(true));
        ldapService.deletePermissions(list);
View Full Code Here

TOP

Related Classes of org.openengsb.domain.userprojects.model.Permission

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.