frysk.hpd
Class HpdTestbed

java.lang.Object
  extended by frysk.expunit.Expect
      extended by frysk.testbed.TearDownExpect
          extended by frysk.hpd.HpdTestbed

public class HpdTestbed
extends TearDownExpect

Variation on frysk.expunit.Expect that drives the HPD.


Constructor Summary
HpdTestbed()
          Create an FHPD process managed by Expect.
HpdTestbed(String param, String startup)
          Create an FHPD process, with PARAM, managed by expect; wait for the STARTUP message followed immediately by the prompt.
 
Method Summary
 HpdTestbed expectPrompt()
          Expect; after skipping garbage, a command prompt.
 HpdTestbed expectPrompt(String output)
          Expect OUTPUT immediately followed by the prompt.
 HpdTestbed sendCommandExpectPrompt(String command, String output)
          Send COMMAND ("\n" will be appended); expect OUTPUT along with the prompt (OUTPUT must match everything up to the prompt including newlines); if other output, or a timeout, fail.
 
Methods inherited from class frysk.testbed.TearDownExpect
tearDown
 
Methods inherited from class frysk.expunit.Expect
close, expect, expect, expect, expectEOF, expectTermination, expectTermination, finalize, getPid, send, setDefaultTimeoutSeconds, timeout
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HpdTestbed

public HpdTestbed()
Create an FHPD process managed by Expect.


HpdTestbed

public HpdTestbed(String param,
                  String startup)
Create an FHPD process, with PARAM, managed by expect; wait for the STARTUP message followed immediately by the prompt.

Method Detail

expectPrompt

public HpdTestbed expectPrompt()
Expect; after skipping garbage, a command prompt.


expectPrompt

public HpdTestbed expectPrompt(String output)
Expect OUTPUT immediately followed by the prompt.


sendCommandExpectPrompt

public HpdTestbed sendCommandExpectPrompt(String command,
                                          String output)
Send COMMAND ("\n" will be appended); expect OUTPUT along with the prompt (OUTPUT must match everything up to the prompt including newlines); if other output, or a timeout, fail.