Class StreamGobblerTest

java.lang.Object
test.de.iip_ecosphere.platform.support.StreamGobblerTest

public class StreamGobblerTest extends Object
Tests StreamGobbler.
Author:
Holger Eichelberger, SSE
  • Constructor Details

    • StreamGobblerTest

      public StreamGobblerTest()
  • Method Details

    • testGobbler

      public void testGobbler() throws IOException
      Tests default StreamGobbler.
      Throws:
      IOException - if the process cannot be created
    • testConsumingGobbler

      public void testConsumingGobbler() throws IOException
      Tests StreamGobbler with custom consumer.
      Throws:
      IOException - if the process cannot be created
    • createProcess

      private Process createProcess() throws IOException
      Creates a process, java running Main.
      Returns:
      the process
      Throws:
      IOException - if the process cannot be created
    • waitFor

      private void waitFor(Process proc)
      Quietly waits for the termination of proc.
      Parameters:
      proc - the process to wait for