Index

A B C D E F G H I J L M N O P R S T V W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form

A

add(String) - Method in class org.junit.contrib.java.lang.system.internal.RestoreSpecificSystemProperties
 
add(String) - Method in class org.junit.contrib.java.lang.system.RestoreSystemProperties
Deprecated.
Simply remove all calls to this method. RestoreSystemProperties restores all properties automatically. That's why you don't have to add the properties anymore.
addProperty(String, String) - Method in class org.junit.contrib.java.lang.system.ProvideSystemProperty
 
after() - Method in class org.junit.contrib.java.lang.system.ClearSystemProperties
 
after() - Method in class org.junit.contrib.java.lang.system.ProvideSecurityManager
 
after() - Method in class org.junit.contrib.java.lang.system.ProvideSystemProperty
 
after() - Method in class org.junit.contrib.java.lang.system.RestoreSystemProperties
 
after() - Method in class org.junit.contrib.java.lang.system.TextFromStandardInputStream
 
and(String, String) - Method in class org.junit.contrib.java.lang.system.ProvideSystemProperty
 
apply(Statement, Description) - Method in class org.junit.contrib.java.lang.system.DisallowWriteToSystemErr
 
apply(Statement, Description) - Method in class org.junit.contrib.java.lang.system.DisallowWriteToSystemOut
 
apply(Statement, Description) - Method in class org.junit.contrib.java.lang.system.EnvironmentVariables
 
apply(Statement, Description) - Method in class org.junit.contrib.java.lang.system.ExpectedSystemExit
 
apply(Statement, Description) - Method in class org.junit.contrib.java.lang.system.StandardErrorStreamLog
Deprecated.
 
apply(Statement, Description) - Method in class org.junit.contrib.java.lang.system.StandardOutputStreamLog
Deprecated.
 
apply(Statement, Description) - Method in class org.junit.contrib.java.lang.system.SystemErrRule
 
apply(Statement, Description) - Method in class org.junit.contrib.java.lang.system.SystemOutRule
 
Assertion - Interface in org.junit.contrib.java.lang.system
An Assertion encapsulates the code of an assertion into an object.
assertions - Variable in class org.junit.contrib.java.lang.system.ExpectedSystemExit
 
Assertions - Search tag in class org.junit.contrib.java.lang.system.SystemErrRule
Section
Assertions - Search tag in class org.junit.contrib.java.lang.system.SystemOutRule
Section
AUTO_FLUSH - Static variable in enum org.junit.contrib.java.lang.system.internal.PrintStreamHandler
 

B

baseStatement - Variable in class org.junit.contrib.java.lang.system.EnvironmentVariables.EnvironmentVariablesStatement
 
before() - Method in class org.junit.contrib.java.lang.system.ClearSystemProperties
 
before() - Method in class org.junit.contrib.java.lang.system.ProvideSecurityManager
 
before() - Method in class org.junit.contrib.java.lang.system.ProvideSystemProperty
 
before() - Method in class org.junit.contrib.java.lang.system.RestoreSystemProperties
 
before() - Method in class org.junit.contrib.java.lang.system.TextFromStandardInputStream
 
buffer - Variable in class org.junit.contrib.java.lang.system.EnvironmentVariables
 

C

checkAccept(String, int) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkAccess(Thread) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkAccess(ThreadGroup) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkAssertion() - Method in interface org.junit.contrib.java.lang.system.Assertion
 
checkAssertionAfterwards(Assertion) - Method in class org.junit.contrib.java.lang.system.ExpectedSystemExit
 
checkAssertions() - Method in class org.junit.contrib.java.lang.system.ExpectedSystemExit
 
checkAwtEventQueueAccess() - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkConnect(String, int) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkConnect(String, int, Object) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkCreateClassLoader() - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkDelete(String) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkExec(String) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkExit(int) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
CheckExitCalled - Exception Class in org.junit.contrib.java.lang.system.internal
 
CheckExitCalled(int) - Constructor for exception class org.junit.contrib.java.lang.system.internal.CheckExitCalled
 
checkLink(String) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkListen(int) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkMemberAccess(Class<?>, int) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkMulticast(InetAddress) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkMulticast(InetAddress, byte) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkPackageAccess(String) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkPackageDefinition(String) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkPermission(Permission) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkPermission(Permission, Object) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkPrintJobAccess() - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkPropertiesAccess() - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkPropertyAccess(String) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkRead(FileDescriptor) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkRead(String) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkRead(String, Object) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkSecurityAccess(String) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkSetFactory() - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkSystemClipboardAccess() - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkSystemExit() - Method in class org.junit.contrib.java.lang.system.ExpectedSystemExit
 
checkTopLevelWindow(Object) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkWrite(FileDescriptor) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
checkWrite(String) - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
clear() - Method in class org.junit.contrib.java.lang.system.StandardErrorStreamLog
Deprecated.
Please use SystemErrRule.clearLog().

Clears the log. The log can be used again.

clear() - Method in class org.junit.contrib.java.lang.system.StandardOutputStreamLog
Deprecated.
Please use SystemOutRule.clearLog().

Clears the log. The log can be used again.

clear(String...) - Method in class org.junit.contrib.java.lang.system.EnvironmentVariables
Delete multiple environment variables.
clearLog() - Method in class org.junit.contrib.java.lang.system.internal.LogPrintStream
 
clearLog() - Method in class org.junit.contrib.java.lang.system.SystemErrRule
Clears the current log.
clearLog() - Method in class org.junit.contrib.java.lang.system.SystemOutRule
Clears the current log.
clearProperties() - Method in class org.junit.contrib.java.lang.system.ClearSystemProperties
 
clearProperty(String) - Method in class org.junit.contrib.java.lang.system.ClearSystemProperties
Deprecated.
Clear property for a single test - Search tag in class org.junit.contrib.java.lang.system.ClearSystemProperties
Section
ClearSystemProperties - Class in org.junit.contrib.java.lang.system
The ClearSystemProperties 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).
ClearSystemProperties(String...) - Constructor for class org.junit.contrib.java.lang.system.ClearSystemProperties
Creates a ClearSystemProperties rule that clears the specified properties and restores their original values when the test finishes (whether it passes or fails).
close() - Method in class org.junit.contrib.java.lang.system.internal.LogPrintStream.MuteableLogStream
 
Combine Logging and Muting - Search tag in class org.junit.contrib.java.lang.system.SystemErrRule
Section
Combine Logging and Muting - Search tag in class org.junit.contrib.java.lang.system.SystemOutRule
Section
contains(byte[], byte[], int) - Method in class org.junit.contrib.java.lang.system.TextFromStandardInputStream.SystemInMock
 
copyOf(Properties) - Method in class org.junit.contrib.java.lang.system.RestoreSystemProperties
 
copyVariablesFromBufferToEnvMap() - Method in class org.junit.contrib.java.lang.system.EnvironmentVariables
 
createNoExitSecurityManagerRule() - Method in class org.junit.contrib.java.lang.system.ExpectedSystemExit
 
createRestoreStatement(Statement) - Method in enum org.junit.contrib.java.lang.system.internal.PrintStreamHandler
 
createStatement(Statement) - Method in class org.junit.contrib.java.lang.system.ExpectedSystemExit
 
createStatement(Statement) - Method in class org.junit.contrib.java.lang.system.internal.DisallowWrite
 
createStatement(Statement) - Method in class org.junit.contrib.java.lang.system.internal.LogPrintStream
 
currentReader - Variable in class org.junit.contrib.java.lang.system.TextFromStandardInputStream.SystemInMock
 

D

DEFAULT_ENCODING - Static variable in enum org.junit.contrib.java.lang.system.internal.PrintStreamHandler
 
disallowWrite - Variable in class org.junit.contrib.java.lang.system.DisallowWriteToSystemErr
 
disallowWrite - Variable in class org.junit.contrib.java.lang.system.DisallowWriteToSystemOut
 
DisallowWrite - Class in org.junit.contrib.java.lang.system.internal
 
DisallowWrite(PrintStreamHandler) - Constructor for class org.junit.contrib.java.lang.system.internal.DisallowWrite
 
DisallowWrite.DisallowWriteStream - Class in org.junit.contrib.java.lang.system.internal
 
DisallowWriteStream() - Constructor for class org.junit.contrib.java.lang.system.internal.DisallowWrite.DisallowWriteStream
 
DisallowWriteToSystemErr - Class in org.junit.contrib.java.lang.system
DisallowWriteToSystemErr lets a test fail if it tries to write something to System.err.
DisallowWriteToSystemErr() - Constructor for class org.junit.contrib.java.lang.system.DisallowWriteToSystemErr
 
DisallowWriteToSystemOut - Class in org.junit.contrib.java.lang.system
DisallowWriteToSystemOut lets a test fail if it tries to write something to System.out.
DisallowWriteToSystemOut() - Constructor for class org.junit.contrib.java.lang.system.DisallowWriteToSystemOut
 

E

emptyStandardInputStream() - Static method in class org.junit.contrib.java.lang.system.TextFromStandardInputStream
 
enableLog() - Method in class org.junit.contrib.java.lang.system.internal.LogPrintStream
 
enableLog() - Method in class org.junit.contrib.java.lang.system.SystemErrRule
Start logging of everything that is written to System.err.
enableLog() - Method in class org.junit.contrib.java.lang.system.SystemOutRule
Start logging of everything that is written to System.out.
EnvironmentVariables - Class in org.junit.contrib.java.lang.system
The EnvironmentVariables rule allows you to set environment variables for your test.
EnvironmentVariables() - Constructor for class org.junit.contrib.java.lang.system.EnvironmentVariables
 
EnvironmentVariables.EnvironmentVariablesStatement - Class in org.junit.contrib.java.lang.system
 
EnvironmentVariablesStatement(Statement) - Constructor for class org.junit.contrib.java.lang.system.EnvironmentVariables.EnvironmentVariablesStatement
 
evaluate() - Method in class org.junit.contrib.java.lang.system.EnvironmentVariables.EnvironmentVariablesStatement
 
expectedStatus - Variable in class org.junit.contrib.java.lang.system.ExpectedSystemExit
 
ExpectedSystemExit - Class in org.junit.contrib.java.lang.system
The ExpectedSystemExit allows in-test specification of expected System.exit(...) calls.
ExpectedSystemExit() - Constructor for class org.junit.contrib.java.lang.system.ExpectedSystemExit
 
expectExit - Variable in class org.junit.contrib.java.lang.system.ExpectedSystemExit
 
expectSystemExit() - Method in class org.junit.contrib.java.lang.system.ExpectedSystemExit
 
expectSystemExitWithStatus(int) - Method in class org.junit.contrib.java.lang.system.ExpectedSystemExit
 

F

failureLog - Variable in class org.junit.contrib.java.lang.system.internal.LogPrintStream.MuteableLogStream
 
failureLogMuted - Variable in class org.junit.contrib.java.lang.system.internal.LogPrintStream.MuteableLogStream
 
flush() - Method in class org.junit.contrib.java.lang.system.internal.LogPrintStream.MuteableLogStream
 
fromFile(String) - Static method in class org.junit.contrib.java.lang.system.ProvideSystemProperty
 
fromInputStream(InputStream) - Static method in class org.junit.contrib.java.lang.system.ProvideSystemProperty
 
fromResource(String) - Static method in class org.junit.contrib.java.lang.system.ProvideSystemProperty
 

G

getEditableMapOfVariables() - Static method in class org.junit.contrib.java.lang.system.EnvironmentVariables
 
getFieldValue(Class<?>, Object, String) - Static method in class org.junit.contrib.java.lang.system.EnvironmentVariables
 
getInCheck() - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
getLog() - Method in class org.junit.contrib.java.lang.system.internal.LogPrintStream
 
getLog() - Method in class org.junit.contrib.java.lang.system.StandardErrorStreamLog
Deprecated.
Please use SystemErrRule.getLog().

Returns the text written to the standard error stream.

getLog() - Method in class org.junit.contrib.java.lang.system.StandardOutputStreamLog
Deprecated.
Please use SystemOutRule.getLog().

Returns the text written to the standard output stream.

getLog() - Method in class org.junit.contrib.java.lang.system.SystemErrRule
Returns the text that is written to System.err since SystemErrRule.enableLog() (respectively SystemErrRule.clearLog() has been called.
getLog() - Method in class org.junit.contrib.java.lang.system.SystemOutRule
Returns the text that is written to System.out since SystemOutRule.enableLog() (respectively SystemOutRule.clearLog() has been called.
getLogAsBytes() - Method in class org.junit.contrib.java.lang.system.internal.LogPrintStream
 
getLogAsBytes() - Method in class org.junit.contrib.java.lang.system.SystemErrRule
Returns the raw bytes that are written to System.err since SystemErrRule.enableLog() (respectively SystemErrRule.clearLog() has been called.
getLogAsBytes() - Method in class org.junit.contrib.java.lang.system.SystemOutRule
Returns the raw bytes that are written to System.out since SystemOutRule.enableLog() (respectively SystemOutRule.clearLog() has been called.
getLogWithNormalizedLineSeparator() - Method in class org.junit.contrib.java.lang.system.internal.LogPrintStream
 
getLogWithNormalizedLineSeparator() - Method in class org.junit.contrib.java.lang.system.SystemErrRule
Returns the text that is written to System.err since SystemErrRule.enableLog() (respectively SystemErrRule.clearLog() has been called.
getLogWithNormalizedLineSeparator() - Method in class org.junit.contrib.java.lang.system.SystemOutRule
Returns the text that is written to System.out since SystemOutRule.enableLog() (respectively SystemOutRule.clearLog() has been called.
getSecurityContext() - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
getStatus() - Method in exception class org.junit.contrib.java.lang.system.internal.CheckExitCalled
 
getStatusOfFirstCheckExitCall() - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
getStream() - Method in enum org.junit.contrib.java.lang.system.internal.PrintStreamHandler
 
getTheCaseInsensitiveEnvironment() - Static method in class org.junit.contrib.java.lang.system.EnvironmentVariables
 
getThreadGroup() - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 

H

handleEmptyReader() - Method in class org.junit.contrib.java.lang.system.TextFromStandardInputStream.SystemInMock
 
handleMissingSystemExit() - Method in class org.junit.contrib.java.lang.system.ExpectedSystemExit
 
handleSystemExitWithStatus(int) - Method in class org.junit.contrib.java.lang.system.ExpectedSystemExit
 

I

ioException - Variable in class org.junit.contrib.java.lang.system.TextFromStandardInputStream.SystemInMock
 
isCheckExitCalled() - Method in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
isCompleteLineWritten(byte[], int) - Method in class org.junit.contrib.java.lang.system.TextFromStandardInputStream.SystemInMock
 

J

join(String[]) - Method in class org.junit.contrib.java.lang.system.TextFromStandardInputStream
 
joinLines(String[]) - Method in class org.junit.contrib.java.lang.system.TextFromStandardInputStream
 

L

log - Variable in class org.junit.contrib.java.lang.system.internal.LogPrintStream.MuteableLogStream
 
LOG_AND_WRITE_TO_STREAM - Enum constant in enum org.junit.contrib.java.lang.system.LogMode
Deprecated.
Please use SystemErrRule.enableLog() or SystemOutRule.enableLog().

Record the writes while they are still written to the stream.

LOG_ONLY - Enum constant in enum org.junit.contrib.java.lang.system.LogMode
Deprecated.
Please use SystemErrRule.enableLog().mute() or SystemOutRule.enableLog().mute().

Capture the writes to the stream. Nothing is written to the stream itself.

LogMode - Enum in org.junit.contrib.java.lang.system
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.

Mode of the StandardErrorStreamLog and the StandardOutputStreamLog.

LogMode() - Constructor for enum org.junit.contrib.java.lang.system.LogMode
Deprecated.
 
logMuted - Variable in class org.junit.contrib.java.lang.system.internal.LogPrintStream.MuteableLogStream
 
logPrintStream - Variable in class org.junit.contrib.java.lang.system.SystemErrRule
 
logPrintStream - Variable in class org.junit.contrib.java.lang.system.SystemOutRule
 
LogPrintStream - Class in org.junit.contrib.java.lang.system.internal
 
LogPrintStream(PrintStreamHandler) - Constructor for class org.junit.contrib.java.lang.system.internal.LogPrintStream
 
LogPrintStream.MuteableLogStream - Class in org.junit.contrib.java.lang.system.internal
 

M

manager - Variable in class org.junit.contrib.java.lang.system.ProvideSecurityManager
 
mute() - Method in class org.junit.contrib.java.lang.system.internal.LogPrintStream
 
mute() - Method in class org.junit.contrib.java.lang.system.SystemErrRule
Suppress the output to System.err.
mute() - Method in class org.junit.contrib.java.lang.system.SystemOutRule
Suppress the output to System.out.
muteableLogStream - Variable in class org.junit.contrib.java.lang.system.internal.LogPrintStream
 
MuteableLogStream(OutputStream) - Constructor for class org.junit.contrib.java.lang.system.internal.LogPrintStream.MuteableLogStream
 
muteForSuccessfulTests() - Method in class org.junit.contrib.java.lang.system.internal.LogPrintStream
 
muteForSuccessfulTests() - Method in class org.junit.contrib.java.lang.system.SystemErrRule
Suppress the output to System.err for successful tests only.
muteForSuccessfulTests() - Method in class org.junit.contrib.java.lang.system.SystemOutRule
Suppress the output to System.out for successful tests only.
Muting - Search tag in class org.junit.contrib.java.lang.system.SystemErrRule
Section
Muting - Search tag in class org.junit.contrib.java.lang.system.SystemOutRule
Section

N

NoExitSecurityManager - Class in org.junit.contrib.java.lang.system.internal
A NoExitSecurityManager throws a CheckExitCalled exception whenever NoExitSecurityManager.checkExit(int) is called.
NoExitSecurityManager(SecurityManager) - Constructor for class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
none() - Static method in class org.junit.contrib.java.lang.system.ExpectedSystemExit
 

O

org.junit.contrib.java.lang.system - package org.junit.contrib.java.lang.system
 
org.junit.contrib.java.lang.system.internal - package org.junit.contrib.java.lang.system.internal
 
originalIn - Variable in class org.junit.contrib.java.lang.system.TextFromStandardInputStream
 
originalManager - Variable in class org.junit.contrib.java.lang.system.ProvideSecurityManager
 
originalProperties - Variable in class org.junit.contrib.java.lang.system.RestoreSystemProperties
 
originalSecurityManager - Variable in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
originalStream - Variable in class org.junit.contrib.java.lang.system.internal.LogPrintStream.MuteableLogStream
 
originalStreamMuted - Variable in class org.junit.contrib.java.lang.system.internal.LogPrintStream.MuteableLogStream
 
originalValues - Variable in class org.junit.contrib.java.lang.system.internal.RestoreSpecificSystemProperties
 
originalVariables - Variable in class org.junit.contrib.java.lang.system.EnvironmentVariables.EnvironmentVariablesStatement
 

P

Prevent output to the standard error stream - Search tag in class org.junit.contrib.java.lang.system.StandardErrorStreamLog
Section
Prevent output to the standard output stream - Search tag in class org.junit.contrib.java.lang.system.StandardOutputStreamLog
Section
printStreamHandler - Variable in class org.junit.contrib.java.lang.system.internal.DisallowWrite
 
printStreamHandler - Variable in class org.junit.contrib.java.lang.system.internal.LogPrintStream
 
PrintStreamHandler - Enum in org.junit.contrib.java.lang.system.internal
 
PrintStreamHandler() - Constructor for enum org.junit.contrib.java.lang.system.internal.PrintStreamHandler
 
properties - Variable in class org.junit.contrib.java.lang.system.ClearSystemProperties
 
properties - Variable in class org.junit.contrib.java.lang.system.internal.RestoreSpecificSystemProperties
 
properties - Variable in class org.junit.contrib.java.lang.system.ProvideSystemProperty
 
provideLines(String...) - Method in class org.junit.contrib.java.lang.system.TextFromStandardInputStream
Set the lines that are returned by System.in.
ProvideSecurityManager - Class in org.junit.contrib.java.lang.system
The ProvideSecurityManager rule provides an arbitrary security manager to a test.
ProvideSecurityManager(SecurityManager) - Constructor for class org.junit.contrib.java.lang.system.ProvideSecurityManager
 
ProvideSystemProperty - Class in org.junit.contrib.java.lang.system
The ProvideSystemProperty rule provides an arbitrary value for a system property to a test.
ProvideSystemProperty() - Constructor for class org.junit.contrib.java.lang.system.ProvideSystemProperty
ProvideSystemProperty(String, String) - Constructor for class org.junit.contrib.java.lang.system.ProvideSystemProperty
 
provideText(String) - Method in class org.junit.contrib.java.lang.system.TextFromStandardInputStream.SystemInMock
 
provideText(String...) - Method in class org.junit.contrib.java.lang.system.TextFromStandardInputStream

R

read() - Method in class org.junit.contrib.java.lang.system.TextFromStandardInputStream.SystemInMock
 
read(byte[], int, int) - Method in class org.junit.contrib.java.lang.system.TextFromStandardInputStream.SystemInMock
 
readNextLine(byte[], int, int) - Method in class org.junit.contrib.java.lang.system.TextFromStandardInputStream.SystemInMock
 
replaceCurrentStreamWithOutputStream(OutputStream) - Method in enum org.junit.contrib.java.lang.system.internal.PrintStreamHandler
 
replaceCurrentStreamWithPrintStream(PrintStream) - Method in enum org.junit.contrib.java.lang.system.internal.PrintStreamHandler
 
restore() - Method in class org.junit.contrib.java.lang.system.internal.RestoreSpecificSystemProperties
 
restore(String, String) - Method in class org.junit.contrib.java.lang.system.internal.RestoreSpecificSystemProperties
 
restoreOriginalValue() - Method in class org.junit.contrib.java.lang.system.ClearSystemProperties
 
restoreOriginalVariables() - Method in class org.junit.contrib.java.lang.system.EnvironmentVariables.EnvironmentVariablesStatement
 
RestoreSpecificSystemProperties - Class in org.junit.contrib.java.lang.system.internal
 
RestoreSpecificSystemProperties() - Constructor for class org.junit.contrib.java.lang.system.internal.RestoreSpecificSystemProperties
 
RestoreSystemProperties - Class in org.junit.contrib.java.lang.system
The RestoreSystemProperties rule undoes changes of system properties when the test finishes (whether it passes or fails).
RestoreSystemProperties() - Constructor for class org.junit.contrib.java.lang.system.RestoreSystemProperties
Creates a RestoreSystemProperties rule that restores all system properties.
RestoreSystemProperties(String...) - Constructor for class org.junit.contrib.java.lang.system.RestoreSystemProperties
Deprecated.
Please use RestoreSystemProperties(). The rule restores all properties. That's why you don't have to specify the properties anymore.
restoreSystemProperty - Variable in class org.junit.contrib.java.lang.system.ClearSystemProperties
 
restoreSystemProperty - Variable in class org.junit.contrib.java.lang.system.ProvideSystemProperty
 
restoreVariables(Map<String, String>) - Method in class org.junit.contrib.java.lang.system.EnvironmentVariables.EnvironmentVariablesStatement
 
runtimeException - Variable in class org.junit.contrib.java.lang.system.TextFromStandardInputStream.SystemInMock
 

S

saveCurrentState() - Method in class org.junit.contrib.java.lang.system.EnvironmentVariables.EnvironmentVariablesStatement
 
serialVersionUID - Static variable in exception class org.junit.contrib.java.lang.system.internal.CheckExitCalled
 
set(String, String) - Method in class org.junit.contrib.java.lang.system.EnvironmentVariables
Set the value of an environment variable.
set(Map<String, String>, String, String) - Method in class org.junit.contrib.java.lang.system.EnvironmentVariables
 
setProperties() - Method in class org.junit.contrib.java.lang.system.ProvideSystemProperty
 
setProperty(String, String) - Method in class org.junit.contrib.java.lang.system.ProvideSystemProperty
Set property for a single test - Search tag in class org.junit.contrib.java.lang.system.ProvideSystemProperty
Section
StandardErrorStreamLog - Class in org.junit.contrib.java.lang.system
Deprecated.
Please use SystemErrRule.

The StandardErrorStreamLog records writes to the standard error stream. The text written is available via StandardErrorStreamLog.getLog().

   public void MyTest {
     @Rule
     public final StandardErrorStreamLog log = new StandardErrorStreamLog();

     @Test
     public void captureErrorStream() {
       System.err.print("hello world");
       assertEquals("hello world", log.getLog());
     }
   }
 
You can clear the log if you only want to test parts of the text written to the standard error stream.
   @Test
   public void captureErrorStream() {
     System.err.print("before");
     log.clear();
     System.err.print("afterwards");
     assertEquals("afterwards", log.getLog());
   }
 

Prevent output to the standard error stream

In general it is not necessary that a test writes to the standard error stream. Avoiding this output may speed up the test and reduce the clutter on the commandline.

The test does not write to the stream if the rule is created with the LogMode.LOG_ONLY mode.

 @Rule
 public final StandardErrorStreamLog log = new StandardErrorStreamLog(LOG_ONLY);
StandardErrorStreamLog() - Constructor for class org.junit.contrib.java.lang.system.StandardErrorStreamLog
Deprecated.
Please use new SystemErrRule().enableLog().

Creates a rule that records writes while they are still written to the standard error stream.

StandardErrorStreamLog(LogMode) - Constructor for class org.junit.contrib.java.lang.system.StandardErrorStreamLog
Deprecated.
Please use new SystemErrRule().enableLog() instead of new StandardErrorStreamLog(LogMode.LOG_AND_WRITE_TO_STREAM) or new SystemErrRule().enableLog().mute() instead of new StandardErrorStreamLog(LogMode.LOG_ONLY).

Creates a rule that records writes to the standard error stream according to the specified LogMode.

StandardOutputStreamLog - Class in org.junit.contrib.java.lang.system
Deprecated.
Please use SystemOutRule.

The StandardOutputStreamLog records writes to the standard output stream. The text written is available via StandardOutputStreamLog.getLog().

   public void MyTest {
     @Rule
     public final StandardOutputStreamLog log = new StandardOutputStreamLog();

     @Test
     public void captureOutputStream() {
       System.out.print("hello world");
       assertEquals("hello world", log.getLog());
     }
   }
 
You can clear the log if you only want to test parts of the text written to the standard output stream.
   @Test
   public void captureOutputStream() {
     System.out.print("before");
     log.clear();
     System.out.print("afterwards");
     assertEquals("afterwards", log.getLog());
   }
 

Prevent output to the standard output stream

In general it is not necessary that a test writes to the standard output stream. Avoiding this output may speed up the test and reduce the clutter on the commandline.

The test does not write to the stream if the rule is created with the LogMode.LOG_ONLY mode.

 @Rule
 public final StandardOutputStreamLog log = new StandardOutputStreamLog(LOG_ONLY);
StandardOutputStreamLog() - Constructor for class org.junit.contrib.java.lang.system.StandardOutputStreamLog
Deprecated.
Please use new SystemOutRule().enableLog().

Creates a rule that records writes while they are still written to the standard output stream.

StandardOutputStreamLog(LogMode) - Constructor for class org.junit.contrib.java.lang.system.StandardOutputStreamLog
Deprecated.
Please use new SystemOutRule().enableLog() instead of new StandardOutputStreamLog(LogMode.LOG_AND_WRITE_TO_STREAM) or new SystemOutRule().enableLog().mute() instead of new StandardOutputStreamLog(LogMode.LOG_ONLY).

Creates a rule that records writes to the standard output stream according to the specified LogMode.

statementIsExecuting - Variable in class org.junit.contrib.java.lang.system.EnvironmentVariables
 
status - Variable in exception class org.junit.contrib.java.lang.system.internal.CheckExitCalled
 
statusOfFirstExitCall - Variable in class org.junit.contrib.java.lang.system.internal.NoExitSecurityManager
 
SYSTEM_ERR - Enum constant in enum org.junit.contrib.java.lang.system.internal.PrintStreamHandler
 
SYSTEM_OUT - Enum constant in enum org.junit.contrib.java.lang.system.internal.PrintStreamHandler
 
systemErrRule - Variable in class org.junit.contrib.java.lang.system.StandardErrorStreamLog
Deprecated.
 
SystemErrRule - Class in org.junit.contrib.java.lang.system
The SystemErrRule intercepts the writes to System.err.
SystemErrRule() - Constructor for class org.junit.contrib.java.lang.system.SystemErrRule
 
systemInMock - Variable in class org.junit.contrib.java.lang.system.TextFromStandardInputStream
 
SystemInMock() - Constructor for class org.junit.contrib.java.lang.system.TextFromStandardInputStream.SystemInMock
 
systemOut - Variable in class org.junit.contrib.java.lang.system.StandardOutputStreamLog
Deprecated.
 
SystemOutRule - Class in org.junit.contrib.java.lang.system
The SystemOutRule intercepts the writes to System.out.
SystemOutRule() - Constructor for class org.junit.contrib.java.lang.system.SystemOutRule
 

T

TextFromStandardInputStream - Class in org.junit.contrib.java.lang.system
The TextFromStandardInputStream rule replaces System.in with another InputStream, which provides an arbitrary text.
TextFromStandardInputStream(String) - Constructor for class org.junit.contrib.java.lang.system.TextFromStandardInputStream
TextFromStandardInputStream.SystemInMock - Class in org.junit.contrib.java.lang.system
 
throwExceptionOnInputEnd(IOException) - Method in class org.junit.contrib.java.lang.system.TextFromStandardInputStream.SystemInMock
 
throwExceptionOnInputEnd(IOException) - Method in class org.junit.contrib.java.lang.system.TextFromStandardInputStream
Specify an IOException that is thrown by System.in.
throwExceptionOnInputEnd(RuntimeException) - Method in class org.junit.contrib.java.lang.system.TextFromStandardInputStream.SystemInMock
 
throwExceptionOnInputEnd(RuntimeException) - Method in class org.junit.contrib.java.lang.system.TextFromStandardInputStream
Specify a RuntimeException that is thrown by System.in.
Throwing Exceptions - Search tag in class org.junit.contrib.java.lang.system.TextFromStandardInputStream
Section

V

valueOf(String) - Static method in enum org.junit.contrib.java.lang.system.internal.PrintStreamHandler
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.junit.contrib.java.lang.system.LogMode
Deprecated.
Returns the enum constant of this type with the specified name.
values() - Static method in enum org.junit.contrib.java.lang.system.internal.PrintStreamHandler
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum org.junit.contrib.java.lang.system.LogMode
Deprecated.
Returns an array containing the constants of this enum type, in the order they are declared.

W

write(int) - Method in class org.junit.contrib.java.lang.system.internal.DisallowWrite.DisallowWriteStream
 
write(int) - Method in class org.junit.contrib.java.lang.system.internal.LogPrintStream.MuteableLogStream
 
writeVariableToBuffer(String, String) - Method in class org.junit.contrib.java.lang.system.EnvironmentVariables
 
writeVariableToEnvMap(String, String) - Method in class org.junit.contrib.java.lang.system.EnvironmentVariables
 
A B C D E F G H I J L M N O P R S T V W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form