Tests operations with storage
installTestSuites();
declare("Run suites");
AutoMIDlet midlet1 = midletDescr1.start(null);
AutoMIDlet midlet2 = midletDescr2.start(null);
// Initial state is 'PAUSED'.
midlet1.switchTo(AutoMIDletLifeCycleState.ACTIVE, true);
midlet2.switchTo(AutoMIDletLifeCycleState.ACTIVE, true);
assertTrue("Invalid state of the midlet #1.", midlet1.
getLifeCycleState().equals(AutoMIDletLifeCycleState.ACTIVE));
assertTrue("Invalid state of the midlet #2.", midlet2.
getLifeCycleState().equals(AutoMIDletLifeCycleState.ACTIVE));
midlet1.switchTo(AutoMIDletForegroundState.FOREGROUND, true);
midlet2.switchTo(AutoMIDletForegroundState.BACKGROUND, true);
try {
Thread.sleep(2000);
} catch (InterruptedException ie) {
}
midlet2.switchTo(AutoMIDletForegroundState.FOREGROUND, true);
try {
Thread.sleep(2000);
} catch (InterruptedException ie) {
}
midlet1.switchTo(AutoMIDletLifeCycleState.DESTROYED, true);
midlet2.switchTo(AutoMIDletLifeCycleState.DESTROYED, true);
uninstallTestSuites();