com.google.gwt.junit.server
Class JUnitHostImpl

java.lang.Object
  extended by HttpServlet
      extended by com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
          extended by com.google.gwt.rpc.server.RpcServlet
              extended by com.google.gwt.user.server.rpc.HybridServiceServlet
                  extended by com.google.gwt.junit.server.JUnitHostImpl
All Implemented Interfaces:
JUnitHost, RemoteService, SerializationPolicyProvider

public class JUnitHostImpl
extends HybridServiceServlet
implements JUnitHost

An RPC servlet that serves as a proxy to JUnitTestShell. Enables communication between the unit test code running in a browser and the real test process.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.google.gwt.junit.client.impl.JUnitHost
JUnitHost.ClientInfo, JUnitHost.InitialResponse, JUnitHost.TestBlock, JUnitHost.TestInfo
 
Constructor Summary
JUnitHostImpl()
           
 
Method Summary
 JUnitHost.InitialResponse getTestBlock(int blockIndex, JUnitHost.ClientInfo clientInfo)
          Gets a specific block of tests to run.
 JUnitHost.TestBlock reportResultsAndGetTestBlock(java.util.HashMap<JUnitHost.TestInfo,JUnitResult> results, int testBlock, JUnitHost.ClientInfo clientInfo)
          Reports results for the last method run and gets the name of next method to run.
 
Methods inherited from class com.google.gwt.user.server.rpc.HybridServiceServlet
getClientOracle, getSerializationPolicy, processCall, processCall
 
Methods inherited from class com.google.gwt.rpc.server.RpcServlet
processPost
 
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JUnitHostImpl

public JUnitHostImpl()
Method Detail

getTestBlock

public JUnitHost.InitialResponse getTestBlock(int blockIndex,
                                              JUnitHost.ClientInfo clientInfo)
                                       throws TimeoutException
Description copied from interface: JUnitHost
Gets a specific block of tests to run.

Specified by:
getTestBlock in interface JUnitHost
Parameters:
blockIndex - the index of the test block to retrieve
clientInfo - the info for this client
Returns:
the initial response
Throws:
TimeoutException - if the wait for the next method times out.

reportResultsAndGetTestBlock

public JUnitHost.TestBlock reportResultsAndGetTestBlock(java.util.HashMap<JUnitHost.TestInfo,JUnitResult> results,
                                                        int testBlock,
                                                        JUnitHost.ClientInfo clientInfo)
                                                 throws TimeoutException
Description copied from interface: JUnitHost
Reports results for the last method run and gets the name of next method to run.

Specified by:
reportResultsAndGetTestBlock in interface JUnitHost
Parameters:
results - the results of executing the test
testBlock - the index of the test block to retrieve
clientInfo - the info for this client
Returns:
the next test block
Throws:
TimeoutException - if the wait for the next method times out.