Package org.openrefine.runners.testing
Class RunnerTestBase
- java.lang.Object
-
- org.openrefine.runners.testing.RunnerTestBase
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description RunnerTestBase()
-
Method Summary
-
-
-
Field Detail
-
SUT
protected Runner SUT
-
simpleGrid
protected Grid simpleGrid
-
longerGrid
protected Grid longerGrid
-
gridToSort
protected Grid gridToSort
-
simpleChangeData
protected ChangeData<String> simpleChangeData
-
sortingConfig
protected SortingConfig sortingConfig
-
overlayModel
protected OverlayModel overlayModel
-
utf8
protected Charset utf8
-
tempDir
protected File tempDir
-
myRowFilter
protected static RowFilter myRowFilter
-
myRecordFilter
protected static RecordFilter myRecordFilter
-
concatRowMapper
public static RowMapper concatRowMapper
-
rowDuplicator
public static RowFlatMapper rowDuplicator
-
statefulRowMapper
public static RowScanMapper<String> statefulRowMapper
-
concatRecordMapper
public static RecordMapper concatRecordMapper
-
rowFilterGreaterThanTwo
protected static RowFilter rowFilterGreaterThanTwo
-
concatChangeMapper
public static RowChangeDataProducer<String> concatChangeMapper
-
firstTwoRows
protected static RowFilter firstTwoRows
-
countingChangeMapper
protected static RowChangeDataProducer<String> countingChangeMapper
-
batchedChangeMapper
public static RowChangeDataProducer<String> batchedChangeMapper
-
faultyBatchedChangeMapper
public static RowChangeDataProducer<String> faultyBatchedChangeMapper
-
joiner
public static RowChangeDataJoiner<String> joiner
-
recordChangeMapper
public static RecordChangeDataProducer<String> recordChangeMapper
-
firstRecord
protected static RecordFilter firstRecord
-
countingRecordChangeMapper
protected static RecordChangeDataProducer<String> countingRecordChangeMapper
-
faultyBatchedRecordChangeMapper
public static RecordChangeDataProducer<String> faultyBatchedRecordChangeMapper
-
flatJoiner
public static RowChangeDataFlatJoiner<String> flatJoiner
-
recordJoiner
public static RecordChangeDataJoiner<String> recordJoiner
-
-
Method Detail
-
getDatamodelRunner
public abstract Runner getDatamodelRunner() throws IOException
- Throws:
IOException
-
setUp
@BeforeClass public void setUp() throws IOException
- Throws:
IOException
-
tearDown
@AfterClass public void tearDown()
-
createGrid
protected Grid createGrid(String[] columnNames, Serializable[][] cellValues)
-
createChangeData
protected <T extends Serializable> ChangeData<T> createChangeData(IndexedData<T>... data)
-
setUpExamples
@BeforeMethod public void setUpExamples()
-
row
protected Row row(Serializable... values)
-
testAccessMetadata
public void testAccessMetadata()
-
testWithOverlayModel
public void testWithOverlayModel()
-
testDatamodelRunner
public void testDatamodelRunner()
-
testAccessRows
public void testAccessRows()
-
testGetRowsAfter
public void testGetRowsAfter()
-
testGetRowsBefore
public void testGetRowsBefore()
-
testGetRowsById
public void testGetRowsById()
-
testAccessRowsOutOfBounds
public void testAccessRowsOutOfBounds()
-
testIterateRowsFilter
public void testIterateRowsFilter()
-
testCountMatchingRows
public void testCountMatchingRows()
-
testCountMatchingRecordsApproxOvershoot
public void testCountMatchingRecordsApproxOvershoot()
-
testCountMatchingRecordsApproxZero
public void testCountMatchingRecordsApproxZero()
-
testCountMatchingRecordsApproxIntermediate
public void testCountMatchingRecordsApproxIntermediate()
-
testAccessRecords
public void testAccessRecords()
-
testGetRecordsAfter
public void testGetRecordsAfter()
-
testGetRecordsBefore
public void testGetRecordsBefore()
-
testRecordGroupingNoRecordStart
public void testRecordGroupingNoRecordStart()
-
testRecordsRespectKeyColumnIndex
public void testRecordsRespectKeyColumnIndex()
-
testIterateRecordsFilter
public void testIterateRecordsFilter()
-
testCountMatchingRecords
public void testCountMatchingRecords()
-
testCountMatchingRowsApproxOvershoot
public void testCountMatchingRowsApproxOvershoot()
-
testCountMatchingRowsApproxZero
public void testCountMatchingRowsApproxZero()
-
testCountMatchingRowsApproxIntermediate
public void testCountMatchingRowsApproxIntermediate()
-
testRoundTripSerializationNoProgress
public void testRoundTripSerializationNoProgress() throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
testRoundTripSerializationAsync
public void testRoundTripSerializationAsync() throws IOException, InterruptedException, ExecutionException
-
testReconSerialization
public void testReconSerialization() throws IOException
- Throws:
IOException
-
testLoadIncompleteGrid
public void testLoadIncompleteGrid() throws IOException
- Throws:
IOException
-
testComputeRowFacets
public void testComputeRowFacets()
-
testComputeRecordFacets
public void testComputeRecordFacets()
-
testAggregateRowsApproxPartialResult
public void testAggregateRowsApproxPartialResult()
-
testAggregateRowsApproxFullResult
public void testAggregateRowsApproxFullResult()
-
testAggregateRecordsApproxPartialResult
public void testAggregateRecordsApproxPartialResult()
-
testAggregateRecordsApproxFullResult
public void testAggregateRecordsApproxFullResult()
-
testMapRows
public void testMapRows()
-
testFlatMapRows
public void testFlatMapRows()
-
testStatefullyMapRows
public void testStatefullyMapRows()
-
testMapRecords
public void testMapRecords()
-
testReorderRowsPermanently
public void testReorderRowsPermanently()
-
testReorderRowsTemporarily
public void testReorderRowsTemporarily()
-
testReorderRecordsPermanently
public void testReorderRecordsPermanently()
-
testReorderRecordsTemporarily
public void testReorderRecordsTemporarily()
-
testRemoveRows
public void testRemoveRows()
-
testRemoveRecords
public void testRemoveRecords()
-
testLimitRows
public void testLimitRows()
-
testDropRows
public void testDropRows()
-
testLoadChangeDataDoesNotExist
public void testLoadChangeDataDoesNotExist() throws IOException
- Throws:
IOException
-
testSerializeChangeDataNoProgress
public void testSerializeChangeDataNoProgress() throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
testSerializeChangeDataAsync
public void testSerializeChangeDataAsync() throws IOException, InterruptedException, ExecutionException
-
testSerializeChangeDataDirAlreadyExists
public void testSerializeChangeDataDirAlreadyExists() throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
testIterateChangeData
public void testIterateChangeData()
-
testGenerateRowChangeData
public void testGenerateRowChangeData()
-
testLoadEmptyChangeData
public void testLoadEmptyChangeData() throws IOException
- Throws:
IOException
-
testComputeChangeDataFromIncompleteState
public void testComputeChangeDataFromIncompleteState() throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
testGenerateBatchedChangeData
public void testGenerateBatchedChangeData()
-
testGenerateFaultyRowChangeData
public void testGenerateFaultyRowChangeData()
-
testGenerateRecordChangeData
public void testGenerateRecordChangeData()
-
testComputeChangeDataFromIncompleteStateInRecordsMode
public void testComputeChangeDataFromIncompleteStateInRecordsMode() throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
testGenerateFaultyRecordChangeData
public void testGenerateFaultyRecordChangeData()
-
testJoinChangeData
public void testJoinChangeData()
-
testFlatJoinChangeData
public void testFlatJoinChangeData()
-
testRecordJoinChangeData
public void testRecordJoinChangeData()
-
testConcatenate
public void testConcatenate()
-
testConcatenateIncompatibleNumberOfColumns
public void testConcatenateIncompatibleNumberOfColumns()
-
testLoadTextFile
public void testLoadTextFile() throws IOException
- Throws:
IOException
-
testLoadTextFileWithProgress
public void testLoadTextFileWithProgress() throws IOException
- Throws:
IOException
-
testLoadTextFileLimit
public void testLoadTextFileLimit() throws IOException
- Throws:
IOException
-
testLoadTextFileTrailingNewLine
public void testLoadTextFileTrailingNewLine() throws IOException
- Throws:
IOException
-
testLoadTextFileDoesNotExist
public void testLoadTextFileDoesNotExist() throws IOException
- Throws:
IOException
-
createTestTextFile
protected void createTestTextFile(File file, String contents) throws IOException
- Throws:
IOException
-
testCachingWithoutProgress
public void testCachingWithoutProgress()
-
testCachingAsync
public void testCachingAsync() throws ExecutionException, InterruptedException
-
testLoadGridFromIterable
public void testLoadGridFromIterable() throws IOException
- Throws:
IOException
-
testLoadChangeDataFromIterable
public void testLoadChangeDataFromIterable() throws IOException
- Throws:
IOException
-
testEmptyChangeData
public void testEmptyChangeData() throws IOException
- Throws:
IOException
-
assertGridEquals
public static void assertGridEquals(Grid actual, Grid expected)
BecauseGrid
implementations are not required to use theObject.equals(Object)
method to compare the contents of grids, we use this helper to check that two grids have the same contents.- Parameters:
actual
-expected
-
-
-