Deprecated API


Contents
Deprecated Classes
org.junit.contrib.java.lang.system.StandardErrorStreamLog
          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);
 

org.junit.contrib.java.lang.system.StandardOutputStreamLog
          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);
 

 

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

 

Deprecated Methods
org.junit.contrib.java.lang.system.RestoreSystemProperties.add(String)
          Simply remove all calls to this method. RestoreSystemProperties restores all properties automatically. That's why you don't have to add the properties anymore. 
org.junit.contrib.java.lang.system.StandardOutputStreamLog.clear()
          Please use SystemOutRule.clearLog().

Clears the log. The log can be used again. 

org.junit.contrib.java.lang.system.StandardErrorStreamLog.clear()
          Please use SystemErrRule.clearLog().

Clears the log. The log can be used again. 

org.junit.contrib.java.lang.system.ClearSystemProperties.clearProperty(String)
          Please use RestoreSystemProperties along with System.clearProperty(String). 
org.junit.contrib.java.lang.system.StandardOutputStreamLog.getLog()
          Please use SystemOutRule.getLog().

Returns the text written to the standard output stream. 

org.junit.contrib.java.lang.system.StandardErrorStreamLog.getLog()
          Please use SystemErrRule.getLog().

Returns the text written to the standard error stream. 

org.junit.contrib.java.lang.system.TextFromStandardInputStream.provideText(String...)
          please use TextFromStandardInputStream.provideLines(String...) 
org.junit.contrib.java.lang.system.ProvideSystemProperty.setProperty(String, String)
          Please use RestoreSystemProperties along with System.setProperty(String, String). 
 

Deprecated Constructors
org.junit.contrib.java.lang.system.ProvideSystemProperty()
          see ProvideSystemProperty.setProperty(String, String). 
org.junit.contrib.java.lang.system.RestoreSystemProperties(String...)
          Please use RestoreSystemProperties.RestoreSystemProperties(). The rule restores all properties. That's why you don't have to specify the properties anymore. 
org.junit.contrib.java.lang.system.StandardErrorStreamLog()
          Please use new SystemErrRule().enableLog().

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

org.junit.contrib.java.lang.system.StandardErrorStreamLog(LogMode)
          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. 

org.junit.contrib.java.lang.system.StandardOutputStreamLog()
          Please use new SystemOutRule().enableLog().

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

org.junit.contrib.java.lang.system.StandardOutputStreamLog(LogMode)
          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. 

org.junit.contrib.java.lang.system.TextFromStandardInputStream(String)
          use TextFromStandardInputStream.provideLines(String...) 
 

Deprecated Enum Constants
org.junit.contrib.java.lang.system.LogMode.LOG_AND_WRITE_TO_STREAM
          Please use SystemErrRule.enableLog() or SystemOutRule.enableLog().

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

org.junit.contrib.java.lang.system.LogMode.LOG_ONLY
          Please use SystemErrRule.enableLog().mute() or SystemOutRule.enableLog().mute().

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

 



Copyright © 2011–2018. All rights reserved.


NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14