use of au.gov.asd.tac.constellation.views.dataaccess.templates.TSVDropper.TSVDropperToGraphPlugin in project constellation by constellation-app.
the class TSVDropperNGTest method testTSVDropperToGraphPlugin.
@Test
public void testTSVDropperToGraphPlugin() throws InterruptedException, PluginException {
final PluginInteraction interaction = mock(PluginInteraction.class);
final PluginParameters parameters = mock(PluginParameters.class);
final StoreGraph graph = new StoreGraph(new AnalyticSchemaFactory().createSchema());
VisualConcept.VertexAttribute.X.ensure(graph);
VisualConcept.VertexAttribute.Y.ensure(graph);
VisualConcept.VertexAttribute.Z.ensure(graph);
final RecordStore recordStore = new GraphRecordStore();
recordStore.add();
recordStore.set(GraphRecordStoreUtilities.SOURCE + VisualConcept.VertexAttribute.IDENTIFIER, "foo");
recordStore.set(GraphRecordStoreUtilities.DESTINATION + VisualConcept.VertexAttribute.IDENTIFIER, "bar");
final File file = new File(TSVDropperNGTest.class.getResource("./resources/sample.tsv").getFile());
final List<File> files = new ArrayList<>();
files.add(file);
final TSVDropperToGraphPlugin plugin = new TSVDropperToGraphPlugin(recordStore, files);
final RecordStore expResult = plugin.query(recordStore, interaction, parameters);
assertEquals(recordStore, expResult);
}
Aggregations