use of com.vodafone360.people.service.interfaces.IWorkerThreadControl 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);
}
Aggregations