| java.lang.Object com.sun.midp.i3test.TestCase javax.microedition.lcdui.TestCommandSorting
TestCommandSorting | public class TestCommandSorting extends TestCase (Code) | | This test case does extensive testing on command sorting in chameleon.
It validates the rules specified in the spec for sorting commands
in a particular order along with taking their priorities into
consideration. For example, it tests the decision on what goes into the
left soft button and what goes into the right soft button as the system
menu list of commands.
|
Field Summary | |
protected Display | display | final static String | testName | protected MIDPWindow | window Reference to MIDPWindow, to help us gain access into
SoftButtonLayer's attributes used in this test. |
Method Summary | |
protected void | checkLeftBtn(LcduiTestCanvas canvas, Command cmd) Utility method that checks that the left soft button is indeed the
intended one as passed in via parameter cmd, after making the canvas
current. | public void | runTests() Overridden from TestCase parent. | protected void | testFive() This test is for a canvas with the BACK, STOP, CANCEL, EXIT, HELP,
OK, SCREEN & ITEM commands added. | protected void | testFour() This test is for a canvas with the BACK, EXIT, CANCEL & STOP
commands added. | protected void | testOne() This test is for a canvas with just the STOP command added. | protected void | testSix() This test is for a canvas with the HELP, OK, SCREEN & ITEM
commands added, without any negative commands and check to see
if the left soft button is mapped to the highest positive
command as expected. | protected void | testThree() This test is for a canvas with the EXIT, CANCEL & STOP commands added.
The EXIT command should be the left soft button. | protected void | testTwo() This test is for a canvas with the CANCEL & STOP commands added. |
display | protected Display display(Code) | | The Display to use to view our test canvases
|
window | protected MIDPWindow window(Code) | | Reference to MIDPWindow, to help us gain access into
SoftButtonLayer's attributes used in this test.
|
TestCommandSorting | public TestCommandSorting()(Code) | | Simple constructor.
|
checkLeftBtn | protected void checkLeftBtn(LcduiTestCanvas canvas, Command cmd)(Code) | | Utility method that checks that the left soft button is indeed the
intended one as passed in via parameter cmd, after making the canvas
current.
Parameters: canvas - the canvas being used to test the commands Parameters: cmd - the command under test |
runTests | public void runTests() throws Throwable(Code) | | Overridden from TestCase parent. This method will kick off each
individual test
|
testFive | protected void testFive()(Code) | | This test is for a canvas with the BACK, STOP, CANCEL, EXIT, HELP,
OK, SCREEN & ITEM commands added. The BACK command should be the
left soft button. And all the other commands should be sorted
correctly as defined in the spec on the right soft button as the
system menu. (combination of positive & negative commands are
being tested)
|
testFour | protected void testFour()(Code) | | This test is for a canvas with the BACK, EXIT, CANCEL & STOP
commands added. The BACK command should be the left soft button.
(only negative commands are being tested)
|
testOne | protected void testOne()(Code) | | This test is for a canvas with just the STOP command added. The STOP
command should be the left soft button. (only negative commands are
being tested)
|
testSix | protected void testSix()(Code) | | This test is for a canvas with the HELP, OK, SCREEN & ITEM
commands added, without any negative commands and check to see
if the left soft button is mapped to the highest positive
command as expected. All the remaining positive
commands should be sorted correctly as defined in the spec on
the right soft button as the system menu. (only positive commands are
being tested)
|
testThree | protected void testThree()(Code) | | This test is for a canvas with the EXIT, CANCEL & STOP commands added.
The EXIT command should be the left soft button. (only negative
commands are being tested)
|
testTwo | protected void testTwo()(Code) | | This test is for a canvas with the CANCEL & STOP commands added. The
CANCEL command should be the left soft button. (only negative
commands are being tested)
|
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)
|
|
|