public abstract class DriverElementBase extends Object
Constructor and Description |
---|
DriverElementBase() |
Modifier and Type | Method and Description |
---|---|
protected abstract Class<?> |
getCallerClass()
Returns the caller class.
|
protected abstract TestDataToolProvider |
getTestTools()
Returns the test tools.
|
protected <T> DataModelSinkFactory |
toDataModelSinkFactory(DataModelDefinition<T> definition,
Class<? extends DataFormat<? super T>> formatClass,
File destinationFile)
Converts an output path to
DataModelSinkFactory to write to the path. |
protected <T> DataModelSourceFactory |
toDataModelSourceFactory(DataModelDefinition<T> definition,
Class<? extends DataFormat<? super T>> formatClass,
File sourceFile)
Loads a source file
DataModelSourceFactory which provides data models. |
protected <T> DataModelSourceFactory |
toDataModelSourceFactory(DataModelDefinition<T> definition,
Class<? extends DataFormat<? super T>> formatClass,
String sourcePath)
Loads a source file
DataModelSourceFactory which provides data models. |
protected <T> DataModelSourceFactory |
toDataModelSourceFactory(DataModelDefinition<T> definition,
Iterable<? extends T> sourceObjects)
Converts an data model object collection into
DataModelSourceFactory which provides data models. |
protected <T> DataModelSourceFactory |
toDataModelSourceFactory(Provider<? extends Source<? extends T>> sourceProvider)
Converts an data model object collection into
DataModelSourceFactory which provides data models. |
protected DataModelSourceFactory |
toDataModelSourceFactory(String sourcePath)
Converts a source path into
DataModelSourceFactory which provides data models. |
protected <T> DataModelSourceFilter |
toDataModelSourceFilter(DataModelDefinition<T> definition,
Consumer<? super T> transformer)
Converts an model transformer into
DataModelSourceFilter . |
protected URI |
toOutputUri(String path)
Returns a URI for the local resource.
|
URI |
toUri(String path)
Returns URI for the existing resource.
|
protected VerifierFactory |
toVerifierFactory(VerifierFactory verifierFactory,
UnaryOperator<DataModelSource> sourceFilter)
Converts a pair of expected data set factory and verify rule factory into
VerifyRuleFactory . |
protected abstract Class<?> getCallerClass()
protected abstract TestDataToolProvider getTestTools()
protected final DataModelSourceFactory toDataModelSourceFactory(String sourcePath)
DataModelSourceFactory
which provides data models.
This implementation lazily converts source contents into equivalent DataModelReflection
s.sourcePath
- the source pathDataModelSourceFactory
IllegalArgumentException
- if the target resource is not foundprotected final <T> DataModelSourceFactory toDataModelSourceFactory(DataModelDefinition<T> definition, Iterable<? extends T> sourceObjects)
DataModelSourceFactory
which provides data models.
This implementation immediately converts data model objects into equivalent DataModelReflection
s.T
- the data model typedefinition
- the data model definitionsourceObjects
- the original data model objectsDataModelSourceFactory
protected final <T> DataModelSourceFactory toDataModelSourceFactory(Provider<? extends Source<? extends T>> sourceProvider)
DataModelSourceFactory
which provides data models.
This implementation lazily converts data model objects into equivalent DataModelReflection
s.T
- the data model typesourceProvider
- the original data model objectsDataModelSourceFactory
protected final <T> DataModelSourceFactory toDataModelSourceFactory(DataModelDefinition<T> definition, Class<? extends DataFormat<? super T>> formatClass, String sourcePath)
DataModelSourceFactory
which provides data models.
This implementation immediately converts loaded into DataModelReflection
s.T
- the data typedefinition
- the data model definitionformatClass
- the data format classsourcePath
- the input file path on the class pathDataModelSourceFactory
protected final <T> DataModelSourceFactory toDataModelSourceFactory(DataModelDefinition<T> definition, Class<? extends DataFormat<? super T>> formatClass, File sourceFile)
DataModelSourceFactory
which provides data models.
This implementation immediately converts loaded into DataModelReflection
s.T
- the data typedefinition
- the data model definitionformatClass
- the data format classsourceFile
- the input fileDataModelSourceFactory
protected final <T> DataModelSourceFilter toDataModelSourceFilter(DataModelDefinition<T> definition, Consumer<? super T> transformer)
DataModelSourceFilter
.T
- the data model typedefinition
- the target data model definitiontransformer
- the data model transformerprotected final <T> DataModelSinkFactory toDataModelSinkFactory(DataModelDefinition<T> definition, Class<? extends DataFormat<? super T>> formatClass, File destinationFile)
DataModelSinkFactory
to write to the path.T
- the data typedefinition
- the data model definitionformatClass
- the data format classdestinationFile
- the output pathprotected final VerifierFactory toVerifierFactory(VerifierFactory verifierFactory, UnaryOperator<DataModelSource> sourceFilter)
VerifyRuleFactory
.verifierFactory
- the original verifier factorysourceFilter
- the filter for verifier inputVerifierFactory
which provides a verifier using the filtered inputpublic URI toUri(String path) throws URISyntaxException
path
- the path string of the target resourceURISyntaxException
- if the URI is not validCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.