public class TestModerator extends Object
Constructor and Description |
---|
TestModerator(TestToolRepository repository,
TestContext context)
Creates a new instance which uses registerd services.
|
Modifier and Type | Method and Description |
---|---|
List<Difference> |
inspect(Class<?> modelClass,
ExporterDescription description,
VerifyContext verifyContext,
VerifierFactory verifier)
Inspects the target exporter's output using specified expected data and rule.
|
void |
prepare(Class<?> modelClass,
ExporterDescription description,
DataModelSourceFactory source)
Prepares the target exporter's output using the specified source.
|
void |
prepare(Class<?> modelClass,
ImporterDescription description,
DataModelSourceFactory source)
Prepares the target importer's input using the specified source.
|
void |
save(Class<?> modelClass,
ExporterDescription description,
DataModelSinkFactory resultDataSink)
Saves the target exporter's output into the specified sink.
|
void |
save(Class<?> modelClass,
Iterable<Difference> differences,
DifferenceSinkFactory differenceSink)
Saves difference list into the specified sink.
|
void |
truncate(ExporterDescription description)
Truncates the target exporter's output.
|
void |
truncate(ImporterDescription description)
Truncates the target importer's input.
|
void |
validate(Class<?> modelClass,
String label,
DataModelSourceFactory target)
Validates
DataModelSource s. |
void |
validate(Class<?> modelClass,
String label,
VerifierFactory target)
Validates
Verifier s. |
public TestModerator(TestToolRepository repository, TestContext context)
repository
- the tool repositorycontext
- current contextIllegalArgumentException
- if some parameters were null
public void truncate(ImporterDescription description) throws IOException
description
- target importerIOException
- if failed to prepare the importerIllegalArgumentException
- if some parameters were null
public void truncate(ExporterDescription description) throws IOException
description
- target importerIOException
- if failed to prepare the importerIllegalArgumentException
- if some parameters were null
public void validate(Class<?> modelClass, String label, DataModelSourceFactory target) throws IOException
DataModelSource
s.modelClass
- class of data modellabel
- label of the target sourcetarget
- validation targetIOException
- if validation was failedpublic void validate(Class<?> modelClass, String label, VerifierFactory target) throws IOException
Verifier
s.modelClass
- class of data modellabel
- label of the target sourcetarget
- validation targetIOException
- if validation was failedpublic void prepare(Class<?> modelClass, ImporterDescription description, DataModelSourceFactory source) throws IOException
modelClass
- class of data modeldescription
- target importersource
- test dataIOException
- if failed to prepare the importerIllegalArgumentException
- if some parameters were null
public void prepare(Class<?> modelClass, ExporterDescription description, DataModelSourceFactory source) throws IOException
modelClass
- class of data modeldescription
- target importersource
- test dataIOException
- if failed to prepare the importerIllegalArgumentException
- if some parameters were null
public List<Difference> inspect(Class<?> modelClass, ExporterDescription description, VerifyContext verifyContext, VerifierFactory verifier) throws IOException
modelClass
- class of data modeldescription
- target exporterverifyContext
- current verification contextverifier
- verifier factoryIOException
- if failed to inspect the resultIllegalArgumentException
- if some parameters were null
public void save(Class<?> modelClass, ExporterDescription description, DataModelSinkFactory resultDataSink) throws IOException
modelClass
- class of data modeldescription
- target exporterresultDataSink
- the result sinkIOException
- if failed to save the resultIllegalArgumentException
- if some parameters were null
public void save(Class<?> modelClass, Iterable<Difference> differences, DifferenceSinkFactory differenceSink) throws IOException
modelClass
- class of data modeldifferences
- target listdifferenceSink
- the difference sinkIOException
- if failed to save the differencesIllegalArgumentException
- if some parameters were null
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.