Package com.mockobjects.io
Class MockIOFactory
- java.lang.Object
-
- com.mockobjects.MockObject
-
- com.mockobjects.io.MockIOFactory
-
- All Implemented Interfaces:
IOFactory
,Verifiable
public class MockIOFactory extends MockObject implements IOFactory
-
-
Constructor Summary
Constructors Constructor Description MockIOFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
createFile(java.lang.String fileName)
java.io.InputStream
createInputStream(File aFile)
java.io.OutputStream
createOutputStream(File aFile)
void
setExpectedFileName(java.lang.String fileName)
void
setupCreateFile(File file)
void
setupInputStream(File expectedFile, java.io.InputStream returnStream)
void
setupOutputStream(File expectedFile, java.io.OutputStream returnStream)
-
Methods inherited from class com.mockobjects.MockObject
notImplemented, notYetImplemented, verify
-
-
-
-
Method Detail
-
setupInputStream
public void setupInputStream(File expectedFile, java.io.InputStream returnStream)
-
createInputStream
public java.io.InputStream createInputStream(File aFile) throws java.io.FileNotFoundException
- Specified by:
createInputStream
in interfaceIOFactory
- Throws:
java.io.FileNotFoundException
-
setupOutputStream
public void setupOutputStream(File expectedFile, java.io.OutputStream returnStream)
-
createOutputStream
public java.io.OutputStream createOutputStream(File aFile) throws java.io.FileNotFoundException
- Specified by:
createOutputStream
in interfaceIOFactory
- Throws:
java.io.FileNotFoundException
-
setupCreateFile
public void setupCreateFile(File file)
-
setExpectedFileName
public void setExpectedFileName(java.lang.String fileName)
-
createFile
public File createFile(java.lang.String fileName)
- Specified by:
createFile
in interfaceIOFactory
-
-