| java.lang.Object com.sun.midp.i3test.TestCase javax.microedition.lcdui.TestKeyConverter
TestKeyConverter | public class TestKeyConverter extends TestCase (Code) | | Tests for the KeyConverter utility class.
|
Method Summary | |
void | checkGameAction(int ga) Checks one game action. | public void | runTests() Runs all tests. | void | testAllGameActions() Tests existence and symmetry of every game action. | void | testGetKeyName1() Tests getKeyName() for the set of numeric keys. | void | testGetKeyName2() Tests getKeyName() for the set of keys mapped to game actions. | void | testGetSystemKey() Tests getSystemKey(). | void | testNonSystemKey() Tests that none of the standard keys KEY_NUM0..KEY_NUM9, KEY_STAR,
KEY_POUND, and none of the game actions, is a system key, by
checking that getSystemKey returns 0 in each case. |
checkGameAction | void checkGameAction(int ga)(Code) | | Checks one game action. Ensures that a keycode exists for every
game action defined by the specification. Also checks that the keycode
maps back to the same game action.
|
runTests | public void runTests()(Code) | | Runs all tests.
|
testAllGameActions | void testAllGameActions()(Code) | | Tests existence and symmetry of every game action. For every game
action, ensures that it is mapped to a keycode, and then ensures that
that keycode maps back to the original game action. This test is
device-independent.
|
testGetKeyName1 | void testGetKeyName1()(Code) | | Tests getKeyName() for the set of numeric keys. The expected names for
these keys are probably device-independent.
|
testGetKeyName2 | void testGetKeyName2()(Code) | | Tests getKeyName() for the set of keys mapped to game actions.
NOTE: the expected key names are device- and language-specific.
|
testGetSystemKey | void testGetSystemKey()(Code) | | Tests getSystemKey().
NOTE: this test includes device-dependent keycode values.
|
testNonSystemKey | void testNonSystemKey()(Code) | | Tests that none of the standard keys KEY_NUM0..KEY_NUM9, KEY_STAR,
KEY_POUND, and none of the game actions, is a system key, by
checking that getSystemKey returns 0 in each case. This test is
probably device-independent.
|
Methods inherited from com.sun.midp.i3test.TestCase | public void assertEquals(Object expected, Object actual)(Code)(Java Doc) public void assertEquals(String message, Object expected, Object actual)(Code)(Java Doc) public void assertEquals(int expected, int actual)(Code)(Java Doc) public void assertEquals(String message, int expected, int actual)(Code)(Java Doc) public void assertFalse(boolean condition)(Code)(Java Doc) public void assertFalse(String message, boolean condition)(Code)(Java Doc) public void assertNotNull(Object object)(Code)(Java Doc) public void assertNotNull(String message, Object object)(Code)(Java Doc) public void assertNotSame(Object expected, Object actual)(Code)(Java Doc) public void assertNotSame(String message, Object expected, Object actual)(Code)(Java Doc) public void assertNull(Object object)(Code)(Java Doc) public void assertNull(String message, Object object)(Code)(Java Doc) public void assertSame(Object expected, Object actual)(Code)(Java Doc) public void assertSame(String message, Object expected, Object actual)(Code)(Java Doc) public void assertTrue(String message, boolean condition)(Code)(Java Doc) public void assertTrue(boolean condition)(Code)(Java Doc) public void declare(String testName)(Code)(Java Doc) public void fail()(Code)(Java Doc) public void fail(String message)(Code)(Java Doc) protected SecurityToken getSecurityToken()(Code)(Java Doc) protected boolean getVerbose()(Code)(Java Doc) public void info(String s)(Code)(Java Doc) abstract public void runTests() throws Throwable(Code)(Java Doc)
|
|
|