Examples of FileRoleManager


Examples of org.apache.lenya.ac.file.FileRoleManager

     *
     * @throws AccessControlException DOCUMENT ME!
     */
    final public void testInstance() throws AccessControlException {
        File configDir = getAccreditablesDirectory();
        FileRoleManager manager = FileRoleManager.instance(configDir);
        assertNotNull(manager);

        FileRoleManager anotherManager = FileRoleManager.instance(configDir);
        assertNotNull(anotherManager);
        assertEquals(manager, anotherManager);
    }
View Full Code Here

Examples of org.apache.lenya.ac.file.FileRoleManager

   * @throws AccessControlException if an error occurs
   */
    final public void testAddRole() throws AccessControlException {
        File configDir = getAccreditablesDirectory();
        String name = "test";
        FileRoleManager manager = null;
        manager = FileRoleManager.instance(configDir);
        assertNotNull(manager);
        Role role = new FileRole(manager.getConfigurationDirectory(), name);
        manager.add(role);

        assertTrue(manager.getRoles().length > 0);
    }
View Full Code Here

Examples of org.apache.lenya.ac.file.FileRoleManager

   */
    final public void testRemoveRole() throws AccessControlException {
        File configDir = getAccreditablesDirectory();
        String name = "test2";
        Role role = new FileRole(configDir, name);
        FileRoleManager manager = null;

        try {
            manager = FileRoleManager.instance(configDir);
        } catch (AccessControlException e) {
            e.printStackTrace();
        }

        assertNotNull(manager);

        Role[] roles = manager.getRoles();
        int roleCountBefore = roles.length;

        manager.add(role);
        manager.remove(role);

        roles = manager.getRoles();
        int roleCountAfter = roles.length;

        assertEquals(roleCountBefore, roleCountAfter);
    }
View Full Code Here

Examples of org.apache.lenya.ac.file.FileRoleManager

     * Run the test
     * @throws AccessControlException if an error occurs
     */
    final public void testInstance() throws AccessControlException {
        File configDir = getAccreditablesDirectory();
        FileRoleManager _manager = FileRoleManager.instance(configDir, getLogger());
        assertNotNull(_manager);

        FileRoleManager anotherManager = FileRoleManager.instance(configDir, getLogger());
        assertNotNull(anotherManager);
        assertEquals(_manager, anotherManager);
    }
View Full Code Here

Examples of org.apache.lenya.ac.file.FileRoleManager

     * @throws AccessControlException if an error occurs
     */
    final public void testAddRole() throws AccessControlException {
        File configDir = getAccreditablesDirectory();
        String name = "test";
        FileRoleManager _manager = null;
        _manager = FileRoleManager.instance(configDir, getLogger());
        assertNotNull(_manager);
        Role role = new FileRole(_manager.getConfigurationDirectory(), name);
        _manager.add(role);

        assertTrue(_manager.getRoles().length > 0);
    }
View Full Code Here

Examples of org.apache.lenya.ac.file.FileRoleManager

     */
    final public void testRemoveRole() throws AccessControlException {
        File configDir = getAccreditablesDirectory();
        String name = "test2";
        Role role = new FileRole(configDir, name);
        FileRoleManager _manager = null;

        try {
            _manager = FileRoleManager.instance(configDir, getLogger());
        } catch (AccessControlException e) {
            e.printStackTrace();
        }

        assertNotNull(_manager);

        Role[] roles = _manager.getRoles();
        int roleCountBefore = roles.length;

        _manager.add(role);
        _manager.remove(role);

        roles = _manager.getRoles();
        int roleCountAfter = roles.length;

        assertEquals(roleCountBefore, roleCountAfter);
    }
View Full Code Here

Examples of org.apache.lenya.ac.file.FileRoleManager

     * Run the test
     * @throws AccessControlException if an error occurs
     */
    final public void testInstance() throws AccessControlException {
        File configDir = getAccreditablesDirectory();
        FileRoleManager _manager = FileRoleManager.instance(getAccreditableManager(), configDir, getLogger());
        assertNotNull(_manager);

        FileRoleManager anotherManager = FileRoleManager.instance(getAccreditableManager(), configDir, getLogger());
        assertNotNull(anotherManager);
        assertEquals(_manager, anotherManager);
    }
View Full Code Here

Examples of org.apache.lenya.ac.file.FileRoleManager

     * @throws AccessControlException if an error occurs
     */
    final public void testAddRole() throws AccessControlException {
        File configDir = getAccreditablesDirectory();
        String name = "test";
        FileRoleManager _manager = null;
        _manager = FileRoleManager.instance(getAccreditableManager(), configDir, getLogger());
        assertNotNull(_manager);
        Role role = new FileRole(getAccreditableManager().getRoleManager(), getLogger(), name);
        _manager.add(role);

        assertTrue(_manager.getRoles().length > 0);
    }
View Full Code Here

Examples of org.apache.lenya.ac.file.FileRoleManager

     */
    final public void testRemoveRole() throws AccessControlException {
        File configDir = getAccreditablesDirectory();
        String name = "test2";
        Role role = new FileRole(getAccreditableManager().getRoleManager(), getLogger(), name);
        FileRoleManager _manager = null;

        try {
            _manager = FileRoleManager.instance(getAccreditableManager(), configDir, getLogger());
        } catch (AccessControlException e) {
            e.printStackTrace();
        }

        assertNotNull(_manager);

        Role[] roles = _manager.getRoles();
        int roleCountBefore = roles.length;

        _manager.add(role);
        _manager.remove(role);

        roles = _manager.getRoles();
        int roleCountAfter = roles.length;

        assertEquals(roleCountBefore, roleCountAfter);
    }
View Full Code Here

Examples of org.apache.lenya.ac.file.FileRoleManager

     *
     * @throws AccessControlException DOCUMENT ME!
     */
    final public void testInstance() throws AccessControlException {
        File configDir = getAccreditablesDirectory();
        FileRoleManager manager = FileRoleManager.instance(configDir);
        assertNotNull(manager);

        FileRoleManager anotherManager = FileRoleManager.instance(configDir);
        assertNotNull(anotherManager);
        assertEquals(manager, anotherManager);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.