Package org.drjekyll.webdav
Class MockPrincipal
- java.lang.Object
-
- org.drjekyll.webdav.MockPrincipal
-
- All Implemented Interfaces:
Principal
public class MockPrincipal extends Object implements Principal
Mock Principal object for low-level unit tests of Struts controller components. Coarser grained tests should be implemented in terms of the Cactus framework, instead of the mock object classes.
WARNING - Only the minimal set of methods needed to create unit tests is provided, plus additional methods to configure this object as necessary. Methods for unsupported operations will throw
UnsupportedOperationException
.WARNING - Because unit tests operate in a single threaded environment, no synchronization is performed.
- Version:
- $Rev: 54929 $ $Date: 2008-08-05 07:38:44 $
-
-
Constructor Summary
Constructors Constructor Description MockPrincipal()
MockPrincipal(String name)
MockPrincipal(String name, String[] roles)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getName()
int
hashCode()
boolean
isUserInRole(String role)
-
-
-
Method Detail
-
isUserInRole
public boolean isUserInRole(String role)
-
hashCode
public int hashCode()
-
-