FileDocCategorySizeDatePackage
MockPrintWriter.javaAPI DocExample603Thu Jun 27 19:20:24 BST 2002com.oreilly.mock

MockPrintWriter

public class MockPrintWriter extends PrintWriter

Fields Summary
private String
expectedOutput
Constructors Summary
public MockPrintWriter()

        super(new StringWriter());
    
Methods Summary
public voidsetExpectedOutput(java.lang.String expectedOutput)

        this.expectedOutput = expectedOutput;
    
public voidverify()

        String actualOutput = super.out.toString();
        Assert.assertEquals("PrintWriter content",
                this.expectedOutput, actualOutput);