Methods Summary |
---|
public void | handleActivateAllEvent()Process an ACTIVATE_ALL_EVENT.
MIDletControllerEventConsumer I/F method.
assertTrue(true);
|
public void | handleDestroyAllEvent()Process a SHUTDOWN_ALL_EVENT.
MIDletControllerEventConsumer I/F method.
It simply calls "shutdown()". In future it shall be merged with
"shutdown()" and substitute it.
assertTrue(true);
|
public void | handleDisplayBackgroundRequestEvent(int midletIsolateId, int midletDisplayId)Process a background request event.
MIDletControllerEventConsumer I/F method.
assertEquals(currentIsolateId, midletIsolateId);
assertEquals(displayId, midletDisplayId);
|
public void | handleDisplayCreateNotifyEvent(int midletIsolateId, int midletDisplayId, java.lang.String midletClassName)Process a Display created notification.
MIDletControllerEventConsumer I/F method.
assertEquals(currentIsolateId, midletIsolateId);
assertEquals(displayId, midletDisplayId);
assertEquals(CLASS_NAME, midletClassName);
|
public void | handleDisplayForegroundRequestEvent(int midletIsolateId, int midletDisplayId, boolean isAlert)Process a foreground request event.
MIDletControllerEventConsumer I/F method.
assertEquals(currentIsolateId, midletIsolateId);
assertEquals(displayId, midletDisplayId);
assertTrue(isAlert);
|
public void | handleDisplayPreemptStartEvent(int midletIsolateId, int midletDisplayId)Process a "display preempt start" event.
Set the foreground to a given display if a certain display
has the foreground. Used to start preempting.
MIDletControllerEventConsumer I/F method.
assertEquals(currentIsolateId, midletIsolateId);
assertEquals(displayId, midletDisplayId);
|
public void | handleDisplayPreemptStopEvent(int midletIsolateId, int midletDisplayId)Process a "display preempt stop" event.
Set the foreground to a given display if a certain display
has the foreground. Used to end preempting.
MIDletControllerEventConsumer I/F method.
assertEquals(currentIsolateId, midletIsolateId);
assertEquals(displayId2, midletDisplayId);
|
public void | handleFatalErrorNotifyEvent(int midletIsolateId, int midletDisplayId)Processes FATAL_ERROR_NOTIFICATION.
MIDletControllerEventConsumer I/F method.
assertEquals(currentIsolateId, midletIsolateId);
assertEquals(displayId, midletDisplayId);
|
public void | handleMIDletActiveNotifyEvent(int midletSuiteId, java.lang.String midletClassName)Process a MIDlet active notification
MIDletControllerEventConsumer I/F method.
TBD: param midletProxy proxy with information about MIDlet
assertEquals(SUITE_ID, midletSuiteId);
assertEquals(CLASS_NAME, midletClassName);
|
public void | handleMIDletCreateNotifyEvent(int midletSuiteId, java.lang.String midletClassName, int midletIsolateId, int midletExternalAppId, java.lang.String midletDisplayName)Process a MIDlet created notification.
MIDletControllerEventConsumer I/F method.
assertEquals(SUITE_ID, midletSuiteId);
assertEquals(CLASS_NAME, midletClassName);
assertEquals(currentIsolateId, midletIsolateId);
assertEquals(externalId, midletExternalAppId);
assertEquals(DISPLAY_NAME, midletDisplayName);
|
public void | handleMIDletDestroyNotifyEvent(int midletSuiteId, java.lang.String midletClassName)Process a MIDlet destroyed event.
MIDletControllerEventConsumer I/F method.
assertEquals(SUITE_ID, midletSuiteId);
assertEquals(CLASS_NAME, midletClassName);
|
public void | handleMIDletDestroyRequestEvent(int midletIsolateId, int midletDisplayId)Process a MIDlet destroy request event.
MIDletControllerEventConsumer I/F method.
assertEquals(currentIsolateId, midletIsolateId);
assertEquals(displayId, midletDisplayId);
|
public void | handleMIDletForegroundSelectEvent(int onlyFromLaunched)Process a select foreground event by putting the foreground selector
MIDlet in the foreground.
MIDletControllerEventConsumer I/F method.
|
public void | handleMIDletForegroundTransferEvent(int originMIDletSuiteId, java.lang.String originMIDletClassName, int targetMIDletSuiteId, java.lang.String targetMIDletClassName)Process an event to transition the foreground from a current display
to a target MIDlet by ID and classname. If the source display
does not currently own the foreground the request is ignored.
If the target MIDlet is found in the active list then it it set
as the foreground. If not found, then it should be added as
the next display to get the foreground (when it asks).
MIDletControllerEventConsumer I/F method.
assertEquals(SUITE_ID, originMIDletSuiteId);
assertEquals(CLASS_NAME, originMIDletClassName);
assertEquals(TARGET_SUITE_ID, targetMIDletSuiteId);
assertEquals(TARGET_CLASS_NAME, targetMIDletClassName);
|
public void | handleMIDletPauseNotifyEvent(int midletSuiteId, java.lang.String midletClassName)Process a MIDlet paused notification.
MIDletControllerEventConsumer I/F method.
TBD: param midletProxy proxy with information about MIDlet
assertEquals(SUITE_ID, midletSuiteId);
assertEquals(CLASS_NAME, midletClassName);
|
public void | handleMIDletResumeRequestEvent(int midletSuiteId, java.lang.String midletClassName)Processes a MIDLET_RESUME_REQUEST event.
MIDletControllerEventConsumer I/F method.
assertEquals(SUITE_ID, midletSuiteId);
assertEquals(CLASS_NAME, midletClassName);
|
public void | handleMIDletRsPauseNotifyEvent(int midletSuiteId, java.lang.String midletClassName)Handles notification event of MIDlet resources pause.
MIDletControllerEventConsumer I/F method.
assertEquals(SUITE_ID, midletSuiteId);
assertEquals(CLASS_NAME, midletClassName);
|
public void | handleMIDletStartErrorEvent(int midletSuiteId, java.lang.String midletClassName, int midletExternalAppId, int error, java.lang.String details)Process a MIDlet start error event.
Notify from last to first added to allow the listener to
remove itself without causing a missed notification.
MIDletControllerEventConsumer I/F method.
assertEquals(SUITE_ID, midletSuiteId);
assertEquals(CLASS_NAME, midletClassName);
assertEquals(externalId, midletExternalAppId);
assertEquals(errorCode, error);
assertEquals(ERROR_DETAILES, details);
|
public void | handlePauseAllEvent()Process a PAUSE_ALL_EVENT.
MIDletControllerEventConsumer I/F method.
assertTrue(true);
|
public void | handleSetForegroundByNameRequestEvent(int midletSuiteId, java.lang.String midletClassName)Processes SET_FOREGROUND_BY_NAME_REQUEST event.
Set specified MIDlet to foreground.
assertEquals(SUITE_ID, midletSuiteId);
assertEquals(CLASS_NAME, midletClassName);
|
public void | runTests()Runs all tests. If a test throw a NullPointerException,
the most likely cause is that the listener has not registered with
the event queue for that event type.
token = getSecurityToken();
setUp();
declare("testMIDletStartErrorEvent");
testMIDletStartErrorEvent();
declare("testMIDletCreateNotifyEvent");
testMIDletCreateNotifyEvent();
declare("testMIDletActiveNotifyEvent");
testMIDletActiveNotifyEvent();
declare("testMIDletPauseNotifyEvent");
testMIDletPauseNotifyEvent();
declare("testMIDletDestroyNotifyEvent");
testMIDletDestroyNotifyEvent();
declare("testMIDletResumeRequest");
testMIDletResumeRequest();
declare("testMIDletDestroyRequestEvent");
testMIDletDestroyRequestEvent();
declare("testMIDletForegroundTransferEvent");
testMIDletForegroundTransferEvent();
declare("testDisplayCreateNotifyEvent");
testDisplayCreateNotifyEvent();
declare("testDisplayForegroundRequestEvent");
testDisplayForegroundRequestEvent();
declare("testDisplayBackgroundRequestEvent");
testDisplayBackgroundRequestEvent();
declare("testDisplayPreemptEvents");
testDisplayPreemptEvents();
tearDown();
|
void | setUp()Initializes the test fixture with random data, creates the stub event
queue, and creates the MIDletControllerEventProducer under test.
currentIsolateId = rand.nextInt();
amsIsolateId = rand.nextInt();
displayId = rand.nextInt();
displayId2 = rand.nextInt();
externalId = rand.nextInt();
errorCode = rand.nextInt();
queue = new ListenerTestEventQueue();
producer = new MIDletControllerEventProducer(queue,
amsIsolateId, currentIsolateId);
listener = new MIDletControllerEventListener(queue, this);
|
void | tearDown()Nulls out the stub event queue and the event producer.
queue = null;
producer = null;
|
void | testDisplayBackgroundRequestEvent()Tests sendDisplayBackgroundRequestEvent().
producer.sendDisplayBackgroundRequestEvent(displayId);
|
void | testDisplayCreateNotifyEvent()Tests sendDisplayCreateNotifyEvent().
producer.sendDisplayCreateNotifyEvent(displayId, CLASS_NAME);
|
void | testDisplayForegroundRequestEvent()Tests sendDisplayForegroundRequestEvent().
producer.sendDisplayForegroundRequestEvent(displayId, true);
|
void | testDisplayPreemptEvents()Tests sendDisplayPreemptStartEvent() and
sendDisplayPreemptStopEvent().
producer.sendDisplayPreemptStartEvent(displayId);
producer.sendDisplayPreemptStopEvent(displayId2);
|
void | testMIDletActiveNotifyEvent()Tests sendMIDletActiveNotifyEvent().
producer.sendMIDletActiveNotifyEvent(SUITE_ID, CLASS_NAME);
|
void | testMIDletCreateNotifyEvent()Tests sendMIDletCreateNotifyEvent().
producer.sendMIDletCreateNotifyEvent(SUITE_ID, CLASS_NAME,
externalId, DISPLAY_NAME);
|
void | testMIDletDestroyNotifyEvent()Tests sendMIDletDestroyNotifyEvent().
producer.sendMIDletDestroyNotifyEvent(SUITE_ID, CLASS_NAME);
|
void | testMIDletDestroyRequestEvent()Tests sendMIDletDestroyRequestEvent().
producer.sendMIDletDestroyRequestEvent(displayId);
|
void | testMIDletForegroundTransferEvent()Tests sendMIDletForegroundTransferEvent().
producer.sendMIDletForegroundTransferEvent(
SUITE_ID, CLASS_NAME, TARGET_SUITE_ID, TARGET_CLASS_NAME);
|
void | testMIDletPauseNotifyEvent()Tests sendMIDletPauseNotifyEvent().
producer.sendMIDletPauseNotifyEvent(SUITE_ID, CLASS_NAME);
|
void | testMIDletResumeRequest()Tests sendMIDletResumeRequest().
producer.sendMIDletResumeRequest(SUITE_ID, CLASS_NAME);
|
void | testMIDletStartErrorEvent()Tests sendMIDletStartErrorEvent().
producer.sendMIDletStartErrorEvent(SUITE_ID, CLASS_NAME, externalId,
errorCode, ERROR_DETAILES);
|