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 FileimporterTestDirprotected ImportingJobjobprotected ProjectMetadatametadataprotected com.fasterxml.jackson.databind.node.ObjectNodeoptionsprotected Runnerrunner-
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 GridparseFiles(ImportingParser parser, List<ImportingFileRecord> files, com.fasterxml.jackson.databind.node.ObjectNode options)protected GridparseOneFile(InputStreamImporter parser, Supplier<InputStream> inputStream)protected GridparseOneFile(InputStreamImporter parser, Supplier<InputStream> inputStream, com.fasterxml.jackson.databind.node.ObjectNode options)protected GridparseOneFile(ReaderImporter parser, Supplier<Reader> reader)protected GridparseOneFile(ReaderImporter parser, Supplier<Reader> reader, com.fasterxml.jackson.databind.node.ObjectNode options)protected GridparseOneFile(ImportingParser parser, File file, com.fasterxml.jackson.databind.node.ObjectNode options)protected GridparseOneString(ImportingParser parser, String string)protected GridparseOneString(ImportingParser parser, String contents, com.fasterxml.jackson.databind.node.ObjectNode options)protected FilesaveInputStreamToImporterTestDir(InputStream inputStream)Saves an input stream to a file in the import test directory.voidsetUp()voidsetUpImporterTestDirectory()voidtearDown()voidtearDownTestDirector()-
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
-
-