Search in sources :

Example 1 with ApplicationCache

use of com.vodafone360.people.ApplicationCache in project 360-Engine-for-Android by 360.

the class RemoteServiceTest method testGetServiceInterface.

/**
     * Test getServiceInterface() from RemoteService.
     *
     * @throws Exception Issue setting up the service.
     */
@MediumTest
public final void testGetServiceInterface() throws Exception {
    /** Setup test preconditions (i.e. startService). **/
    startService(new Intent(getContext(), RemoteService.class));
    /** Perform test (i.e. getServiceInterface). **/
    IPeopleService mPeopleService = mApplication.getServiceInterface();
    /** Test if mPeopleService is correctly initialised. **/
    assertNotNull("IPeopleService should not be NULL", mPeopleService);
    IWorkerThreadControl workerThreadControl = (IWorkerThreadControl) FrameworkUtils.get(mPeopleService, "mWorkerThreadControl");
    assertNotNull("Expecting mWorkerThreadControl not to be NULL", workerThreadControl);
    RemoteService service = (RemoteService) FrameworkUtils.get(mPeopleService, "mService");
    assertNotNull("Expecting mService not to be NULL", service);
    UiAgent handlerAgent = (UiAgent) FrameworkUtils.get(mPeopleService, "mHandlerAgent");
    assertNotNull("Expecting mHandlerAgent not to be NULL", handlerAgent);
    ApplicationCache applicationCache = (ApplicationCache) FrameworkUtils.get(mPeopleService, "mApplicationCache");
    assertNotNull("Expecting mApplicationCache not to be NULL", applicationCache);
}
Also used : IWorkerThreadControl(com.vodafone360.people.service.interfaces.IWorkerThreadControl) UiAgent(com.vodafone360.people.service.agent.UiAgent) RemoteService(com.vodafone360.people.service.RemoteService) Intent(android.content.Intent) IPeopleService(com.vodafone360.people.service.interfaces.IPeopleService) ApplicationCache(com.vodafone360.people.ApplicationCache) MediumTest(android.test.suitebuilder.annotation.MediumTest)

Aggregations

Intent (android.content.Intent)1 MediumTest (android.test.suitebuilder.annotation.MediumTest)1 ApplicationCache (com.vodafone360.people.ApplicationCache)1 RemoteService (com.vodafone360.people.service.RemoteService)1 UiAgent (com.vodafone360.people.service.agent.UiAgent)1 IPeopleService (com.vodafone360.people.service.interfaces.IPeopleService)1 IWorkerThreadControl (com.vodafone360.people.service.interfaces.IWorkerThreadControl)1