| 1 | |
package org.webslinger.commons.vfs.tests; |
| 2 | |
|
| 3 | |
import org.apache.commons.vfs.FileObject; |
| 4 | |
import org.apache.commons.vfs.FileSystem; |
| 5 | |
import org.apache.commons.vfs.FileSystemException; |
| 6 | |
import org.apache.commons.vfs.operations.FileOperation; |
| 7 | |
|
| 8 | |
public abstract class OperationTester<O extends FileOperation> extends Tester { |
| 9 | |
protected final Class<O> operationClass; |
| 10 | |
|
| 11 | |
protected OperationTester(FileObject root, Class<O> operationClass) { |
| 12 | 5 | super(root); |
| 13 | 5 | this.operationClass = operationClass; |
| 14 | 5 | } |
| 15 | |
|
| 16 | |
protected O getOperation(FileSystem fs, String path) throws FileSystemException { |
| 17 | 100 | return getOperation(fs, path, operationClass); |
| 18 | |
} |
| 19 | |
|
| 20 | |
protected O getOperation(FileObject file) throws FileSystemException { |
| 21 | 0 | return getOperation(file, operationClass); |
| 22 | |
} |
| 23 | |
} |