@Test public void testWriteAllOnMockVertexListStream() throws IOException { VertexListStream vertexListStream = new MockVertexListStream(vertices); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); try (VertexListStreamWriter writer = new VertexListStreamWriter(vertexListStream, outputStream)) { writer.writeAll(); assertEquals("Output of VertexListStreamWriter is correct", expectedOutput, outputStream.toString()); } }
public void writeAll() throws IOException { while (inputStream.hasNextVertex()) { writeNextVertex(); } outputWriter.flush(); }
VertexListStreamWriter implements AutoCloseable { public void writeAll() throws IOException { while (inputStream.hasNextVertex()) { writeNextVertex(); } outputWriter.flush(); } }
VertexListStreamWriter implements AutoCloseable { public void writeAll() throws IOException { while (inputStream.hasNextVertex()) { writeNextVertex(); } outputWriter.flush(); } VertexListStreamWriter(VertexListStream inputStream, OutputStream outputStream); }
VertexListStreamWriter implements AutoCloseable { public void writeAll() throws IOException { while (inputStream.hasNextVertex()) { writeNextVertex(); } outputWriter.flush(); } VertexListStreamWriter(VertexListStream inputStream, OutputStream outputStream); void writeAll(); @Override void close(); }
VertexListStreamWriter implements AutoCloseable { public void writeAll() throws IOException { while (inputStream.hasNextVertex()) { writeNextVertex(); } outputWriter.flush(); } VertexListStreamWriter(VertexListStream inputStream, OutputStream outputStream); void writeAll(); @Override void close();  }