com.silverpeas.accesscontrol
Class ComponentAccessControllerTest

java.lang.Object
  extended by com.silverpeas.accesscontrol.ComponentAccessControllerTest

@PrepareForTest(value=com.silverpeas.admin.components.Instanciateur.class)
public class ComponentAccessControllerTest
extends Object

Author:
ehugonnet

Field Summary
 MockByReflectionRule mockByReflectionRule
           
 
Constructor Summary
ComponentAccessControllerTest()
           
 
Method Summary
 void setup()
           
 void testGetUserRolesAndIsUserAuthorizedWithAdminUserRoleAndDonwloadContext()
          Test of getUserRoles and isUserAuthorized methods, of class ComponentAccessController.
 void testGetUserRolesAndIsUserAuthorizedWithAdminUserRoleAndPersistContext()
          Test of getUserRoles and isUserAuthorized methods, of class ComponentAccessController.
 void testGetUserRolesAndIsUserAuthorizedWithAdminUserRoleAndUnknownContext()
          Test of getUserRoles and isUserAuthorized methods, of class ComponentAccessController.
 void testGetUserRolesAndIsUserAuthorizedWithReaderUserRoleAndDonwloadContext()
          Test of getUserRoles and isUserAuthorized methods, of class ComponentAccessController.
 void testGetUserRolesAndIsUserAuthorizedWithReaderUserRoleAndPersistContext()
          Test of getUserRoles and isUserAuthorized methods, of class ComponentAccessController.
 void testGetUserRolesAndIsUserAuthorizedWithReaderUserRoleAndUnknownContext()
          Test of getUserRoles and isUserAuthorized methods, of class ComponentAccessController.
 void testGetUserRolesAndIsUserAuthorizedWithWriterUserRoleAndDonwloadContext()
          Test of getUserRoles and isUserAuthorized methods, of class ComponentAccessController.
 void testGetUserRolesAndIsUserAuthorizedWithWriterUserRoleAndPersistContext()
          Test of getUserRoles and isUserAuthorized methods, of class ComponentAccessController.
 void testGetUserRolesAndIsUserAuthorizedWithWriterUserRoleAndUnknownContext()
          Test of getUserRoles and isUserAuthorized methods, of class ComponentAccessController.
 void testIsRightOnTopicsEnabled()
          Test of isRightOnTopicsEnabled method, of class ComponentAccessController.
 void testIsUserAuthorized()
          Test of isUserAuthorized method, of class ComponentAccessController.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mockByReflectionRule

public MockByReflectionRule mockByReflectionRule
Constructor Detail

ComponentAccessControllerTest

public ComponentAccessControllerTest()
Method Detail

setup

public void setup()

testIsRightOnTopicsEnabled

public void testIsRightOnTopicsEnabled()
Test of isRightOnTopicsEnabled method, of class ComponentAccessController.


testIsUserAuthorized

public void testIsUserAuthorized()
                          throws Exception
Test of isUserAuthorized method, of class ComponentAccessController.

Throws:
Exception

testGetUserRolesAndIsUserAuthorizedWithAdminUserRoleAndUnknownContext

public void testGetUserRolesAndIsUserAuthorizedWithAdminUserRoleAndUnknownContext()
                                                                           throws Exception
Test of getUserRoles and isUserAuthorized methods, of class ComponentAccessController.

Throws:
Exception

testGetUserRolesAndIsUserAuthorizedWithAdminUserRoleAndPersistContext

public void testGetUserRolesAndIsUserAuthorizedWithAdminUserRoleAndPersistContext()
                                                                           throws Exception
Test of getUserRoles and isUserAuthorized methods, of class ComponentAccessController.

Throws:
Exception

testGetUserRolesAndIsUserAuthorizedWithAdminUserRoleAndDonwloadContext

public void testGetUserRolesAndIsUserAuthorizedWithAdminUserRoleAndDonwloadContext()
                                                                            throws Exception
Test of getUserRoles and isUserAuthorized methods, of class ComponentAccessController.

Throws:
Exception

testGetUserRolesAndIsUserAuthorizedWithWriterUserRoleAndUnknownContext

public void testGetUserRolesAndIsUserAuthorizedWithWriterUserRoleAndUnknownContext()
                                                                            throws Exception
Test of getUserRoles and isUserAuthorized methods, of class ComponentAccessController.

Throws:
Exception

testGetUserRolesAndIsUserAuthorizedWithWriterUserRoleAndPersistContext

public void testGetUserRolesAndIsUserAuthorizedWithWriterUserRoleAndPersistContext()
                                                                            throws Exception
Test of getUserRoles and isUserAuthorized methods, of class ComponentAccessController.

Throws:
Exception

testGetUserRolesAndIsUserAuthorizedWithWriterUserRoleAndDonwloadContext

public void testGetUserRolesAndIsUserAuthorizedWithWriterUserRoleAndDonwloadContext()
                                                                             throws Exception
Test of getUserRoles and isUserAuthorized methods, of class ComponentAccessController.

Throws:
Exception

testGetUserRolesAndIsUserAuthorizedWithReaderUserRoleAndUnknownContext

public void testGetUserRolesAndIsUserAuthorizedWithReaderUserRoleAndUnknownContext()
                                                                            throws Exception
Test of getUserRoles and isUserAuthorized methods, of class ComponentAccessController.

Throws:
Exception

testGetUserRolesAndIsUserAuthorizedWithReaderUserRoleAndPersistContext

public void testGetUserRolesAndIsUserAuthorizedWithReaderUserRoleAndPersistContext()
                                                                            throws Exception
Test of getUserRoles and isUserAuthorized methods, of class ComponentAccessController.

Throws:
Exception

testGetUserRolesAndIsUserAuthorizedWithReaderUserRoleAndDonwloadContext

public void testGetUserRolesAndIsUserAuthorizedWithReaderUserRoleAndDonwloadContext()
                                                                             throws Exception
Test of getUserRoles and isUserAuthorized methods, of class ComponentAccessController.

Throws:
Exception


Copyright © 2016 Silverpeas. All Rights Reserved.