Class SystemErrAndOutRule

java.lang.Object
uk.org.webcompere.systemstubs.stream.SystemErrAndOut
uk.org.webcompere.systemstubs.rules.SystemErrAndOutRule
All Implemented Interfaces:
org.junit.rules.TestRule, Executable, TestResource, SystemStubTestRule, Output

public class SystemErrAndOutRule extends SystemErrAndOut implements SystemStubTestRule
JUnit4 rule for tapping both System.err and System.out at the same time with the same Output
Since:
1.0.0
  • Constructor Details

    • SystemErrAndOutRule

      public SystemErrAndOutRule()
      Default constructor - uses a TapStream
    • SystemErrAndOutRule

      public SystemErrAndOutRule(Output output)
      Construct with a shared Output
      Parameters:
      output - the output both system err and out will write to
    • SystemErrAndOutRule

      public SystemErrAndOutRule(OutputFactory<? extends OutputStream> outputFactory)
      Construct with an output shared from the an output created against the System.out original
      Parameters:
      outputFactory - the output factory to create the output