Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.mockobjects.io
Class MockIOFactory  view MockIOFactory download MockIOFactory.java

java.lang.Object
  extended bycom.mockobjects.MockObject
      extended bycom.mockobjects.io.MockIOFactory
All Implemented Interfaces:
alt.java.io.IOFactory, com.mockobjects.Verifiable

public class MockIOFactory
extends com.mockobjects.MockObject
implements alt.java.io.IOFactory


Field Summary
private  com.mockobjects.ReturnValue file
           
private  com.mockobjects.ExpectationValue fileName
           
private  com.mockobjects.ReturnObjectBag inputStream
           
private  com.mockobjects.ReturnObjectBag outputStream
           
 
Constructor Summary
MockIOFactory()
           
 
Method Summary
 alt.java.io.File createFile(java.lang.String fileName)
           
 java.io.InputStream createInputStream(alt.java.io.File aFile)
           
 java.io.OutputStream createOutputStream(alt.java.io.File aFile)
           
 void setExpectedFileName(java.lang.String fileName)
           
 void setupCreateFile(alt.java.io.File file)
           
 void setupInputStream(alt.java.io.File expectedFile, java.io.InputStream returnStream)
           
 void setupOutputStream(alt.java.io.File expectedFile, java.io.OutputStream returnStream)
           
 
Methods inherited from class com.mockobjects.MockObject
assertEquals, assertEquals, assertTrue, fail, notImplemented, notYetImplemented, notYetImplemented, verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputStream

private final com.mockobjects.ReturnObjectBag inputStream

outputStream

private final com.mockobjects.ReturnObjectBag outputStream

file

private final com.mockobjects.ReturnValue file

fileName

private final com.mockobjects.ExpectationValue fileName
Constructor Detail

MockIOFactory

public MockIOFactory()
Method Detail

setupInputStream

public void setupInputStream(alt.java.io.File expectedFile,
                             java.io.InputStream returnStream)

createInputStream

public java.io.InputStream createInputStream(alt.java.io.File aFile)
                                      throws java.io.FileNotFoundException
Specified by:
createInputStream in interface alt.java.io.IOFactory

setupOutputStream

public void setupOutputStream(alt.java.io.File expectedFile,
                              java.io.OutputStream returnStream)

createOutputStream

public java.io.OutputStream createOutputStream(alt.java.io.File aFile)
                                        throws java.io.FileNotFoundException
Specified by:
createOutputStream in interface alt.java.io.IOFactory

setupCreateFile

public void setupCreateFile(alt.java.io.File file)

setExpectedFileName

public void setExpectedFileName(java.lang.String fileName)

createFile

public alt.java.io.File createFile(java.lang.String fileName)
Specified by:
createFile in interface alt.java.io.IOFactory