From: Jeff M. <cus...@us...> - 2002-12-31 15:25:51
|
Update of /cvsroot/mockobjects/mockobjects-java/src/jdk/common/com/mockobjects/io In directory sc8-pr-cvs1:/tmp/cvs-serv9545/src/jdk/common/com/mockobjects/io Added Files: MockFileFactory.java Log Message: Added FileFactory --- NEW FILE: MockFileFactory.java --- package com.mockobjects.io; import alt.java.io.FileFactory; import alt.java.io.File; import com.mockobjects.ReturnValue; import com.mockobjects.ExpectationValue; import com.mockobjects.MockObject; /** * @version $Revision: 1.1 $ */ public class MockFileFactory extends MockObject implements FileFactory { private final ReturnValue file = new ReturnValue("file"); private final ExpectationValue fileName = new ExpectationValue("file name"); public void setupCreateFile(File file) { this.file.setValue(file); } public void setExpectedFileName(String fileName){ this.fileName.setExpected(fileName); } public File createFile(String fileName) { this.fileName.setActual(fileName); return (File)file.getValue(); } } |