Search in sources :

Example 1 with MockDataLoadManagerWithoutDataUpdater

use of com.amazon.dataloader.testResources.MockDataLoadManagerWithoutDataUpdater in project zype-firebuilder by zype.

the class DataUpdaterModuleTest method testNonScheduledDataUpdater.

/**
 * Tests non-scheduled data updater, verifying that DataUpdaterTask is not executed by
 * Scheduler
 */
@Test
public void testNonScheduledDataUpdater() throws Exception {
    MockDataLoadManager testDataLoadManagerNoUpdater = new MockDataLoadManagerWithoutDataUpdater(InstrumentationRegistry.getTargetContext());
    testDataLoadManagerNoUpdater.registerUpdateListener(mUpdateListener);
    Thread.sleep(5000);
    verify(MockCacheManagerAdapter.mockCacheManagerAdapter, never()).clearCache();
    verify(mUpdateListener, never()).onSuccess(any(Data.class));
}
Also used : MockDataLoadManagerWithoutDataUpdater(com.amazon.dataloader.testResources.MockDataLoadManagerWithoutDataUpdater) MockDataLoadManager(com.amazon.dataloader.testResources.MockDataLoadManager) Data(com.amazon.utils.model.Data) Test(org.junit.Test)

Aggregations

MockDataLoadManager (com.amazon.dataloader.testResources.MockDataLoadManager)1 MockDataLoadManagerWithoutDataUpdater (com.amazon.dataloader.testResources.MockDataLoadManagerWithoutDataUpdater)1 Data (com.amazon.utils.model.Data)1 Test (org.junit.Test)1