Search in sources :

Example 1 with GraphCsvWriter

use of org.pentaho.metaverse.graph.GraphCsvWriter in project pentaho-metaverse by pentaho.

the class FileSystemLineageWriterTest method testGetSetGraphOutputStream.

@Test
public void testGetSetGraphOutputStream() {
    assertNull(writer.getGraphOutputStream(null));
    IGraphWriter graphWriter = new GraphMLWriter();
    writer.setGraphWriter(graphWriter);
    assertNotNull(writer.getGraphOutputStream(holder));
    graphWriter = new GraphSONWriter();
    writer.setGraphWriter(graphWriter);
    assertNotNull(writer.getGraphOutputStream(holder));
    graphWriter = new GraphCsvWriter();
    writer.setGraphWriter(graphWriter);
    assertNotNull(writer.getGraphOutputStream(holder));
}
Also used : GraphSONWriter(org.pentaho.metaverse.graph.GraphSONWriter) GraphCsvWriter(org.pentaho.metaverse.graph.GraphCsvWriter) IGraphWriter(org.pentaho.metaverse.api.IGraphWriter) GraphMLWriter(org.pentaho.metaverse.graph.GraphMLWriter) Test(org.junit.Test)

Example 2 with GraphCsvWriter

use of org.pentaho.metaverse.graph.GraphCsvWriter in project pentaho-metaverse by pentaho.

the class VfsLineageWriterTest method testSetGraphOutputStream.

@Test
public void testSetGraphOutputStream() throws IOException {
    try (OutputStream graphOutputStream = writer.getGraphOutputStream(null)) {
        assertNull(graphOutputStream);
    }
    IGraphWriter graphWriter = new GraphMLWriter();
    writer.setGraphWriter(graphWriter);
    try (OutputStream graphOutputStream = writer.getGraphOutputStream(holder)) {
        assertNotNull(graphOutputStream);
    }
    graphWriter = new GraphSONWriter();
    writer.setGraphWriter(graphWriter);
    try (OutputStream graphOutputStream = writer.getGraphOutputStream(holder)) {
        assertNotNull(graphOutputStream);
    }
    graphWriter = new GraphCsvWriter();
    writer.setGraphWriter(graphWriter);
    try (OutputStream graphOutputStream = writer.getGraphOutputStream(holder)) {
        assertNotNull(graphOutputStream);
    }
}
Also used : OutputStream(java.io.OutputStream) GraphSONWriter(org.pentaho.metaverse.graph.GraphSONWriter) GraphCsvWriter(org.pentaho.metaverse.graph.GraphCsvWriter) IGraphWriter(org.pentaho.metaverse.api.IGraphWriter) GraphMLWriter(org.pentaho.metaverse.graph.GraphMLWriter) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 IGraphWriter (org.pentaho.metaverse.api.IGraphWriter)2 GraphCsvWriter (org.pentaho.metaverse.graph.GraphCsvWriter)2 GraphMLWriter (org.pentaho.metaverse.graph.GraphMLWriter)2 GraphSONWriter (org.pentaho.metaverse.graph.GraphSONWriter)2 OutputStream (java.io.OutputStream)1