Package org.junit.contrib.java.lang.system
package org.junit.contrib.java.lang.system
-
ClassDescriptionAn
Assertion
encapsulates the code of an assertion into an object.TheClearSystemProperties
rule clears a set of system properties when the test starts and restores their original values when the test finishes (whether it passes or fails).DisallowWriteToSystemErr
lets a test fail if it tries to write something toSystem.err
.DisallowWriteToSystemOut
lets a test fail if it tries to write something toSystem.out
.TheEnvironmentVariables
rule allows you to set environment variables for your test.TheExpectedSystemExit
allows in-test specification of expectedSystem.exit(...)
calls.Deprecated.This enum is no longer needed, because all rules that are using it have been replaced with rules that don't need the enum.TheProvideSecurityManager
rule provides an arbitrary security manager to a test.TheProvideSystemProperty
rule provides an arbitrary value for a system property to a test.TheRestoreSystemProperties
rule undoes changes of system properties when the test finishes (whether it passes or fails).Deprecated.Please useSystemErrRule
.Deprecated.Please useSystemOutRule
.TheSystemErrRule
intercepts the writes toSystem.err
.TheSystemOutRule
intercepts the writes toSystem.out
.TheTextFromStandardInputStream
rule replacesSystem.in
with anotherInputStream
, which provides an arbitrary text.