It would be cool to support "recursive partial mocking".
Imagine this:
void addFolderToLogPaths(final File logFolder, final List<LogFile> logFileList,
final Collection<ITargetPersistenceUnit> persistentUnits) {
if (!logFolder.isDirectory()) {
throw new IllegalArgumentException("logPath is not a directory.");
}
final File[] allLogFiles = logFolder.listFiles();
for (File fileOrDirectory : allLogFiles) {
if (fileOrDirectory.isDirectory()) {
addFolderToLogPaths(fileOrDirectory, logFileList,
persistentUnits);
} else {
logFileList.add(new
LogFile(getRelativeLogPath(fileOrDirectory), fileOrDirectory.lastModified(),
isFileReplayable(persistentUnits, fileOrDirectory)));
}
}
}
We could implement so that one call to addFolderToLogPaths (the actual test
invocation) passes the MockGateway but sequential invocations should be
mocked.
Original issue reported on code.google.com by johan.ha...@gmail.com on 1 Oct 2008 at 12:54
Original issue reported on code.google.com by
johan.ha...@gmail.com
on 1 Oct 2008 at 12:54