Search in sources :

Example 1 with DefaultRequestListenerNotifier

use of com.octo.android.robospice.request.notifier.DefaultRequestListenerNotifier in project robospice by stephanenicolas.

the class RequestProcessorTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    // https://code.google.com/p/dexmaker/issues/detail?id=2
    System.setProperty("dexmaker.dexcache", getContext().getCacheDir().getPath());
    mockCacheManager = EasyMock.createMock(CacheManager.class);
    requestProcessorListener = new RequestProcessorListener() {

        @Override
        public void allRequestComplete() {
        }

        @Override
        public void requestsInProgress() {
        }
    };
    ExecutorService executorService = PriorityThreadPoolExecutor.getPriorityExecutor(1);
    networkStateChecker = new MockNetworkStateChecker();
    progressReporter = new DefaultRequestListenerNotifier();
    spiceServiceListenerNotifier = new SpiceServiceListenerNotifier();
    mockRequestProgressManager = new RequestProgressManager(requestProcessorListener, progressReporter, spiceServiceListenerNotifier);
    mockRequestRunner = new DefaultRequestRunner(getContext(), mockCacheManager, executorService, mockRequestProgressManager, networkStateChecker);
    requestProcessorUnderTest = new RequestProcessor(mockCacheManager, mockRequestProgressManager, mockRequestRunner);
}
Also used : DefaultRequestListenerNotifier(com.octo.android.robospice.request.notifier.DefaultRequestListenerNotifier) ExecutorService(java.util.concurrent.ExecutorService) CacheManager(com.octo.android.robospice.persistence.CacheManager) SpiceServiceListenerNotifier(com.octo.android.robospice.request.notifier.SpiceServiceListenerNotifier)

Aggregations

CacheManager (com.octo.android.robospice.persistence.CacheManager)1 DefaultRequestListenerNotifier (com.octo.android.robospice.request.notifier.DefaultRequestListenerNotifier)1 SpiceServiceListenerNotifier (com.octo.android.robospice.request.notifier.SpiceServiceListenerNotifier)1 ExecutorService (java.util.concurrent.ExecutorService)1