FileDocCategorySizeDatePackage
TestSystemServiceManager.javaAPI DocphoneME MR2 API (J2ME)2607Wed May 02 18:00:10 BST 2007com.sun.midp.services

TestSystemServiceManager

public class TestSystemServiceManager extends com.sun.midp.i3test.TestCase

Fields Summary
public static final String
SERVICE_ID
private static SecurityToken
token
Constructors Summary
Methods Summary
public voidrunTests()
Runs all tests.

        declare("testActual");
        testActual();
    
voidtestActual()

        SystemServiceManager serviceManager = 
            SystemServiceManager.getInstance(token);
        DummySystemService service = new DummySystemService();
        serviceManager.registerService(service);
        
        SystemServiceRequestor serviceRequestor = 
            SystemServiceRequestor.getInstance(token);
        serviceRequestor.requestService(SERVICE_ID);

        assertTrue("Service started", service.wasStarted);
        assertTrue("Service requested", service.wasRequested);