|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.uispec4j.UISpecTestCase
public abstract class UISpecTestCase
UISpec4J-enabled TestCase class.
Test cases derived from this class automatically set up the instanciation mechanism. They can
also access the application main window by defining an adapter, i.e. a class implementing
the UISpecAdapter class.
The adapter can be set from the test setUp() or any test method using the
setAdapter(UISpecAdapter) method.
The adapter can also be registered by setting the uispec4j.adapter property as follows:
uispec4j.adapter=samples.addressbook.test.Adapter
| Constructor Summary | |
|---|---|
protected |
UISpecTestCase()
|
protected |
UISpecTestCase(java.lang.String testName)
|
| Method Summary | |
|---|---|
Assertion |
and(Assertion... assertions)
Returns the intersection of two assertions. |
void |
assertEquals(boolean expected,
Assertion assertion)
Checks that the given assertion equals the expected parameter. |
void |
assertEquals(java.lang.String message,
boolean expected,
Assertion assertion)
Checks that the given assertion equals the expected parameter. |
void |
assertFalse(Assertion assertion)
Checks that the given assertion fails. |
void |
assertFalse(java.lang.String message,
Assertion assertion)
Checks that the given assertion fails. |
void |
assertThat(Assertion assertion)
Checks the given assertion. |
void |
assertThat(java.lang.String message,
Assertion assertion)
Checks the given assertion. |
void |
assertTrue(Assertion assertion)
Checks the given assertion. |
void |
assertTrue(java.lang.String message,
Assertion assertion)
Checks the given assertion. |
Window |
getMainWindow()
Returns the Window created by the adapter. |
Assertion |
not(Assertion assertion)
Returns a negation of the given assertion. |
Assertion |
or(Assertion... assertions)
Returns the union of two assertions. |
void |
setAdapter(UISpecAdapter adapter)
|
protected void |
setUp()
Initializes the resources needed by the test case. NB: If you provide your own implementation, do not forget to call this one first. |
protected void |
tearDown()
Checks whether an unexpected exception had occurred, and releases the test resources. |
void |
waitUntil(Assertion assertion,
long waitTimeLimit)
Waits for at most 'waitTimeLimit' ms until the assertion is true. |
void |
waitUntil(java.lang.String message,
Assertion assertion,
long waitTimeLimit)
Waits for at most 'waitTimeLimit' ms until the assertion is true. |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, 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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected UISpecTestCase()
protected UISpecTestCase(java.lang.String testName)
| Method Detail |
|---|
public void setAdapter(UISpecAdapter adapter)
protected void setUp()
throws java.lang.Exception
setUp in class junit.framework.TestCasejava.lang.Exception
protected void tearDown()
throws java.lang.Exception
tearDown in class junit.framework.TestCasejava.lang.Exception
public Window getMainWindow()
throws org.uispec4j.UISpecTestCase.AdapterNotFoundException
AdapterNotFoundException - if the uispec4j.adapter property does not refer
to a valid adapter
org.uispec4j.UISpecTestCase.AdapterNotFoundExceptionpublic void assertTrue(Assertion assertion)
#assertThat(Assertion.
UISpecAssert.assertTrue(Assertion)
public void assertTrue(java.lang.String message,
Assertion assertion)
#assertThat(String,Assertion.
UISpecAssert.assertTrue(String,Assertion)public void assertThat(Assertion assertion)
#assertTrue(Assertion.
UISpecAssert.assertThat(Assertion)
public void assertThat(java.lang.String message,
Assertion assertion)
#assertTrue(String,Assertion.
UISpecAssert.assertTrue(String,Assertion)
public void waitUntil(Assertion assertion,
long waitTimeLimit)
UISpecAssert.waitUntil(Assertion, long)public void assertFalse(Assertion assertion)
UISpecAssert.assertFalse(Assertion)
public void waitUntil(java.lang.String message,
Assertion assertion,
long waitTimeLimit)
UISpecAssert.waitUntil(String,Assertion,long)
public void assertFalse(java.lang.String message,
Assertion assertion)
UISpecAssert.assertFalse(String,Assertion)public Assertion not(Assertion assertion)
UISpecAssert.not(Assertion)public Assertion and(Assertion... assertions)
UISpecAssert.and(Assertion[])public Assertion or(Assertion... assertions)
UISpecAssert.or(Assertion[])
public void assertEquals(boolean expected,
Assertion assertion)
UISpecAssert.assertEquals(boolean,Assertion)
public void assertEquals(java.lang.String message,
boolean expected,
Assertion assertion)
UISpecAssert.assertEquals(String,boolean,Assertion)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||