@Test public void testWriteAllOnMockEdgeListStream() throws IOException { EdgeListStream edgeListStream = new MockEdgeListStream(edges); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); try (EdgeListStreamWriter writer = new EdgeListStreamWriter(edgeListStream, outputStream)) { writer.writeAll(); assertEquals("Output of EdgeListStreamWriter is correct", expectedOutput, outputStream.toString()); } }
public void writeAll() throws IOException { while (inputStream.hasNextEdge()) { writeNextEdge(); } outputWriter.flush(); }
EdgeListStreamWriter implements AutoCloseable { public void writeAll() throws IOException { while (inputStream.hasNextEdge()) { writeNextEdge(); } outputWriter.flush(); } }
EdgeListStreamWriter implements AutoCloseable { public void writeAll() throws IOException { while (inputStream.hasNextEdge()) { writeNextEdge(); } outputWriter.flush(); } EdgeListStreamWriter(EdgeListStream inputStream, OutputStream outputStream); }
EdgeListStreamWriter implements AutoCloseable { public void writeAll() throws IOException { while (inputStream.hasNextEdge()) { writeNextEdge(); } outputWriter.flush(); } EdgeListStreamWriter(EdgeListStream inputStream, OutputStream outputStream); void writeAll(); @Override void close(); }
EdgeListStreamWriter implements AutoCloseable { public void writeAll() throws IOException { while (inputStream.hasNextEdge()) { writeNextEdge(); } outputWriter.flush(); } EdgeListStreamWriter(EdgeListStream inputStream, OutputStream outputStream); void writeAll(); @Override void close();  }