edu.sdsc.inca
Class AgentTest.MockDepot

java.lang.Object
  extended by java.lang.Thread
      extended by edu.sdsc.inca.AgentTest.MockDepot
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
AgentTest

public static class AgentTest.MockDepot
extends java.lang.Thread

A mockobject for the depot to that is used from the AgentClientTest.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 int numReportsReceived
           
 int numSuitesExpected
           
 java.lang.String[] reports
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AgentTest.MockDepot(int port, int numReports)
          Create a new mockdepot.
 
Method Summary
 boolean checkReportsForPatterns(java.lang.String[] patterns)
           
 int getNumReportsReceived()
          Return the number of reports the depot actually received.
 void run()
          Start up mock depot server and reply to requests
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

numReportsReceived

public int numReportsReceived

reports

public java.lang.String[] reports

numSuitesExpected

public int numSuitesExpected
Constructor Detail

AgentTest.MockDepot

public AgentTest.MockDepot(int port,
                           int numReports)
Create a new mockdepot.

Parameters:
port - The port to start the mock depot on.
numReports - The number of reports the depot should expect before exitting.
Method Detail

checkReportsForPatterns

public boolean checkReportsForPatterns(java.lang.String[] patterns)

getNumReportsReceived

public int getNumReportsReceived()
Return the number of reports the depot actually received. Should be called after run or start.

Returns:
the number of reports the depot received.

run

public void run()
Start up mock depot server and reply to requests

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread