com.mockobjects.io

## Class MockPrintWriter

- java.lang.Object
- - java.io.Writer
  - - java.io.PrintWriter
    - - com.mockobjects.io.MockPrintWriter

- All Implemented Interfaces:
    Verifiable, java.io.Closeable, java.io.Flushable, java.lang.Appendable, java.lang.AutoCloseable

      public class MockPrintWriter
      extends java.io.PrintWriter
      implements Verifiable

  Author:
    steve@m3p.co.uk, Francois Beausoleil (fbos@users.sourceforge.net)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MockPrintWriter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `void` | `flush()`
    `void` | `setExpectedCloseCalls(int calls)`
    `void` | `setExpectedFlushCalls(int calls)`
    `void` | `setExpectedSegment(java.lang.String aString)`
    `void` | `verify()` Throw an AssertionFailedException if any expectations have not been met.
    `void` | `write(java.lang.String s)`

    - ### Methods inherited from class java.io.PrintWriter

      `append, append, append, checkError, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, write, write, write, write`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MockPrintWriter

          public MockPrintWriter()

  - ### Method Detail

    - #### setExpectedCloseCalls

          public void setExpectedCloseCalls(int calls)

    - #### setExpectedSegment

          public void setExpectedSegment(java.lang.String aString)

    - #### write

          public void write(java.lang.String s)

      Overrides:
        `write` in class `java.io.PrintWriter`

    - #### setExpectedFlushCalls

          public void setExpectedFlushCalls(int calls)

    - #### flush

          public void flush()

      Specified by:
        `flush` in interface `java.io.Flushable`
      Overrides:
        `flush` in class `java.io.PrintWriter`

    - #### close

          public void close()

      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Overrides:
        `close` in class `java.io.PrintWriter`

    - #### verify

          public void verify()

      Description copied from interface: `Verifiable`
      Throw an AssertionFailedException if any expectations have not been met.
      Specified by:
        `verify` in interface `Verifiable`

Copyright © 2002 Mock Objects. All Rights Reserved.