public abstract class DirectIoTester extends Object
@Rule
public final OperatorTestEnvironment environment =
new OperatorTestEnvironment("conf-path-with-directio-settings.xml");
@Test
public void someTest() {
...
DirectIoTester.with(environment)
.resource(SomeData.class, "base/path", "resource/pattern-*.csv")
.prepare("test-data.xls#sheet");
...
}
Example for flow testing:
FlowPartTester tester = ...;
...
DirectIoTester.with(tester)
.resource(SomeData.class, "base/path", "resource/pattern-*.csv")
.prepare("test-data.xls#sheet");
...
tester.runTest(...);
Modifier and Type | Class and Description |
---|---|
static class |
DirectIoTester.DirectIoResource
External resource manipulator for Direct I/O.
|
Constructor and Description |
---|
DirectIoTester() |
Modifier and Type | Method and Description |
---|---|
DirectIoTester.DirectIoResource |
resource(Class<? extends DataFormat<?>> formatClass,
String basePath,
String resourcePattern)
Declares about Direct I/O resource.
|
protected abstract DirectIoTester.DirectIoResource |
resource(DirectFileInputDescription description)
Returns resource for the
DirectFileInputDescription . |
static DirectIoTester |
with(OperatorTestEnvironment tester)
Creates a new instance.
|
static DirectIoTester |
with(TesterBase tester)
Creates a new instance.
|
public static DirectIoTester with(TesterBase tester)
tester
- the target testerpublic static DirectIoTester with(OperatorTestEnvironment tester)
tester
- the target testerpublic DirectIoTester.DirectIoResource resource(Class<? extends DataFormat<?>> formatClass, String basePath, String resourcePattern)
formatClass
- the Direct I/O data format classbasePath
- the base path (must not contain variables)resourcePattern
- the resource pattern (must not contain variables)protected abstract DirectIoTester.DirectIoResource resource(DirectFileInputDescription description)
DirectFileInputDescription
.description
- the importer description to be preparedCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.