Package org.openrefine.importers
Class ImporterTest
- java.lang.Object
-
- org.openrefine.RefineTest
-
- org.openrefine.importers.ImporterTest
-
public class ImporterTest extends RefineTest
-
-
Field Summary
Fields Modifier and Type Field Description protected static File
importerTestDir
protected ImportingJob
job
protected ProjectMetadata
metadata
protected com.fasterxml.jackson.databind.node.ObjectNode
options
protected Runner
runner
-
Fields inherited from class org.openrefine.RefineTest
bindings, logger, workspaceDir
-
-
Constructor Summary
Constructors Constructor Description ImporterTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Grid
parseFiles(ImportingParser parser, List<ImportingFileRecord> files, com.fasterxml.jackson.databind.node.ObjectNode options)
protected Grid
parseOneFile(InputStreamImporter parser, Supplier<InputStream> inputStream)
protected Grid
parseOneFile(InputStreamImporter parser, Supplier<InputStream> inputStream, com.fasterxml.jackson.databind.node.ObjectNode options)
protected Grid
parseOneFile(ReaderImporter parser, Supplier<Reader> reader)
protected Grid
parseOneFile(ReaderImporter parser, Supplier<Reader> reader, com.fasterxml.jackson.databind.node.ObjectNode options)
protected Grid
parseOneFile(ImportingParser parser, File file, com.fasterxml.jackson.databind.node.ObjectNode options)
protected Grid
parseOneString(ImportingParser parser, String string)
protected Grid
parseOneString(ImportingParser parser, String contents, com.fasterxml.jackson.databind.node.ObjectNode options)
protected File
saveInputStreamToImporterTestDir(InputStream inputStream)
Saves an input stream to a file in the import test directory.void
setUp()
void
setUpImporterTestDirectory()
void
tearDown()
void
tearDownTestDirector()
-
Methods inherited from class org.openrefine.RefineTest
assertGridEquals, assertProjectCreated, cleanupProjectsAndJobs, createDatamodelRunner, createGrid, createGridWithRecords, createProject, createProject, createProject, createProject, init, initProjectManager, parseEval, parseEvalType, prepareImportOptions, runner, TearDown, testRecon, toRows
-
-
-
-
Field Detail
-
metadata
protected ProjectMetadata metadata
-
job
protected ImportingJob job
-
options
protected com.fasterxml.jackson.databind.node.ObjectNode options
-
importerTestDir
protected static File importerTestDir
-
runner
protected Runner runner
-
-
Method Detail
-
setUpImporterTestDirectory
@BeforeSuite public void setUpImporterTestDirectory() throws IOException
- Throws:
IOException
-
tearDownTestDirector
@AfterSuite public void tearDownTestDirector() throws IOException
- Throws:
IOException
-
setUp
@BeforeMethod public void setUp()
-
tearDown
@AfterMethod public void tearDown()
-
parseOneFile
protected Grid parseOneFile(ReaderImporter parser, Supplier<Reader> reader) throws Exception
- Throws:
Exception
-
parseOneFile
protected Grid parseOneFile(ReaderImporter parser, Supplier<Reader> reader, com.fasterxml.jackson.databind.node.ObjectNode options) throws Exception
- Throws:
Exception
-
parseOneFile
protected Grid parseOneFile(InputStreamImporter parser, Supplier<InputStream> inputStream) throws Exception
- Throws:
Exception
-
parseOneFile
protected Grid parseOneFile(InputStreamImporter parser, Supplier<InputStream> inputStream, com.fasterxml.jackson.databind.node.ObjectNode options) throws Exception
- Throws:
Exception
-
parseOneFile
protected Grid parseOneFile(ImportingParser parser, File file, com.fasterxml.jackson.databind.node.ObjectNode options) throws Exception
- Throws:
Exception
-
parseFiles
protected Grid parseFiles(ImportingParser parser, List<ImportingFileRecord> files, com.fasterxml.jackson.databind.node.ObjectNode options) throws Exception
- Throws:
Exception
-
parseOneString
protected Grid parseOneString(ImportingParser parser, String contents, com.fasterxml.jackson.databind.node.ObjectNode options) throws Exception
- Throws:
Exception
-
parseOneString
protected Grid parseOneString(ImportingParser parser, String string) throws Exception
- Throws:
Exception
-
saveInputStreamToImporterTestDir
protected File saveInputStreamToImporterTestDir(InputStream inputStream) throws IOException
Saves an input stream to a file in the import test directory.- Parameters:
inputStream
-- Returns:
- Throws:
IOException
-
-