|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
com.google.gwt.junit.client.GWTTestCase
Acts as a bridge between the JUnit environment and the GWT environment. We hook the run method and stash the TestResult object for later communication between the test runner and the unit test shell that drives the test case inside a hosted browser.
There are two versions of this class. One is used in hosted mode and the
other is used in hybrid mode. Implementations are very different between the
two modes, making it simpler to have a separate implementation for each.
Please see the translatable
subpackage for the other
implementation.
Field Summary |
Fields inherited from class java.lang.Object |
typeId, typeName |
Constructor Summary | |
GWTTestCase()
|
Method Summary | |
void |
addCheckpoint(String msg)
Accumulates messages that are printed along with failures (useful in hybrid mode as a substitute for stack traces). |
boolean |
catchExceptions()
Determines whether or not exceptions will be caught by the test fixture. |
void |
clearCheckpoints()
Resets the current checkpoint messages. |
String[] |
getCheckpoints()
Gets the current checkpoint messages. |
abstract String |
getModuleName()
Tests can only be run in the context of a module. |
void |
run(TestResult result)
Stashes the TestResult object so that it can be accessed
from the unit test shell. |
protected void |
runTest()
Runs the test by delegating to the unit test shell. |
protected void |
setUp()
Not supported in the current implemenation. |
protected void |
tearDown()
Not supported in the current implementation. |
Methods inherited from class junit.framework.TestCase |
countTestCases, getName, runBare |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
equals, finalize, hashCode, toString |
Constructor Detail |
public GWTTestCase()
Method Detail |
public void addCheckpoint(String msg)
public boolean catchExceptions()
public void clearCheckpoints()
public String[] getCheckpoints()
public abstract String getModuleName()
public void run(TestResult result)
TestResult
object so that it can be accessed
from the unit test shell.
protected void runTest() throws Throwable
Throwable
protected final void setUp() throws Exception
Exception
protected void tearDown() throws Exception
Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |