stefanbirkner / system-rules

A collection of JUnit rules for testing code which uses java.lang.System.
http://stefanbirkner.github.io/system-rules
Other
546 stars 71 forks source link

Sometimes I need to test some underlying code which closes the standa… #56

Open semenodm opened 6 years ago

semenodm commented 6 years ago

…rd output stream, which leads to wrong behaviour of the JUnit tests. They are shown as not run.

Also in case of multiple invocation of underlying code which closes the output stream the JVM System.out is not available after the first execution. This patch will allow to prevent close original output stream by givin this control to test righter

stefanbirkner commented 6 years ago

Thank you for the pull request. I need a few days for reviewing it. How urgent is it for you to have this feature in System Rules?

semenodm commented 6 years ago

@stefanbirkner I have local build for my project, no urgency. I will make separate PR for the naming issue