org.springframework.boot.test

Class OutputCapture

  • All Implemented Interfaces:
    org.junit.rules.TestRule


    public class OutputCapture
    extends Object
    implements org.junit.rules.TestRule
    JUnit @Rule to capture output from System.out and System.err.
    Author:
    Phillip Webb
    • Constructor Detail

      • OutputCapture

        public OutputCapture()
    • Method Detail

      • apply

        public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,
                                              org.junit.runner.Description description)
        Specified by:
        apply in interface org.junit.rules.TestRule
      • captureOutput

        protected void captureOutput()
      • releaseOutput

        protected void releaseOutput()
      • flush

        public void flush()

Copyright © 2014 Pivotal Software, Inc.. All rights reserved.