|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectj2meunit.framework.Assert
j2meunit.framework.TestCase
com.livescribe.penunit.framework.PenletTestCase
public class PenletTestCase
PenletTestCase is an extension of
TestCase that provides access to an initialized
Penlet. Most of the Penlet implementation needs a
PenletContext to perform useful functions, which can only be
present when the Penlet is initialized (when
com.livescribe.penlet.Penlet#initApp() is called}.
Test cases that extend from PenletTestCase can call
getPenlet() within the testcase method to get access to the Penlet.
Note that if the extension class overrides TestCase.setUp()
and/or TestCase.tearDown(), then they should call the super's
version, so that the penlet class can be initialized.
| Constructor Summary | |
|---|---|
PenletTestCase(java.lang.String penletClassName)
|
|
PenletTestCase(java.lang.String name,
java.lang.String penletClassName)
|
|
PenletTestCase(java.lang.String name,
TestMethod testMethod,
java.lang.String penletClassName)
|
|
| Method Summary | |
|---|---|
static PageInstance |
getPageInstance(int page,
int copy,
long pageAddress)
|
static PageInstance |
getPageInstance(int page,
int copy,
java.lang.String pageAddress)
|
protected Penlet |
getPenlet()
Returns the initialized Penlet. |
protected RegionCollection |
getRegionCollection(PageInstance instance)
Returns the region collection associated with a page. |
protected void |
setUp()
Loads the penlet associated with the testcase. |
protected void |
tearDown()
UnLoads the penlet associated with the testcase. |
| Methods inherited from class j2meunit.framework.TestCase |
|---|
countTestCases, countTestSteps, createResult, getName, getTestMethod, getTestMethodName, onAssertion, run, run, runBare, runTest, setName, setTestMethod, setTestMethod, setTestMethodName, suite, testStepFinished, toString |
| Methods inherited from class j2meunit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PenletTestCase(java.lang.String penletClassName)
public PenletTestCase(java.lang.String name,
java.lang.String penletClassName)
name -
public PenletTestCase(java.lang.String name,
TestMethod testMethod,
java.lang.String penletClassName)
name - testMethod - | Method Detail |
|---|
protected void setUp()
super.setUp() before
setting up the testcase fixture.
setUp in class TestCaseprotected void tearDown()
super.tearDown() after
tearing down testcase related data.
tearDown in class TestCaseprotected Penlet getPenlet()
Penlet. This can return
null if not called from a testcase method. See
setUp() and tearDown() for details
protected RegionCollection getRegionCollection(PageInstance instance)
null if not called from a testcase method. See
setUp() and tearDown() for details
instance - page instance. This should be a non-null value
public static PageInstance getPageInstance(int page,
int copy,
java.lang.String pageAddress)
public static PageInstance getPageInstance(int page,
int copy,
long pageAddress)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||