Class SecurityManagerRule

All Implemented Interfaces:
org.junit.rules.TestRule, Executable, TestResource, SystemStubTestRule

public class SecurityManagerRule extends SecurityManagerStub<SecurityManager> implements SystemStubTestRule
Set an alternative security manager within tests
Since:
1.0.0
  • Constructor Details

    • SecurityManagerRule

      public SecurityManagerRule()
      Default constructor - use this when the security manager will be set in-flight
    • SecurityManagerRule

      public SecurityManagerRule(SecurityManager securityManager)
      Construct with a specific security manager to use
      Parameters:
      securityManager - the security manager to use