kotest-extensions / io.kotest.extensions.system / SecurityManagerProjectListener

SecurityManagerProjectListener

class SecurityManagerProjectListener : SecurityManagerListener, ProjectListener

Overrides System Security Manager with specified securityManager

This is a Listener for code that uses the System Security Manager. It replaces the System Security Manager with the desired securityManager.

After the execution of the project, the System Security Manager is set to what it was before. This will also happen if the original manager is null.

Attention: This code is subject to race conditions. As Java's System Manager is only one per JVM, this code will replace it. However, all other tests are going to use it if tests are running in parallel.

Constructors

<init>

Overrides System Security Manager with specified securityManager

SecurityManagerProjectListener(securityManager: SecurityManager?)

Functions

afterProject

fun afterProject(): Unit

beforeProject

fun beforeProject(): Unit