Add method to write several lines at once
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Wed, 1 Jul 2015 19:27:27 +0000 (21:27 +0200)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Wed, 1 Jul 2015 19:29:48 +0000 (21:29 +0200)
src/test/java/net/pterodactylus/fcp/fake/FakeTcpServer.java

index 6b3674a..e988ff3 100644 (file)
@@ -44,8 +44,10 @@ public class FakeTcpServer implements AutoCloseable {
                return clientSocket.get().collectUntil(lineMatcher);
        }
 
-       public void writeLine(String line) throws IOException {
-               clientSocket.get().writeLine(line);
+       public void writeLine(String... lines) throws IOException {
+               for (String line : lines) {
+                       clientSocket.get().writeLine(line);
+               }
        }
 
        public String readLine() throws IOException {