Search in sources :

Example 1 with DateUtil

use of com.yahoo.elide.async.service.DateUtil in project elide by yahoo.

the class AsyncAPICleanerRunnableTest method setupMocks.

@BeforeEach
public void setupMocks() {
    HashMapDataStore inMemoryStore = new HashMapDataStore(DefaultClassScanner.getInstance(), AsyncQuery.class.getPackage());
    Map<String, Class<? extends Check>> checkMappings = new HashMap<>();
    elide = new Elide(new ElideSettingsBuilder(inMemoryStore).withEntityDictionary(EntityDictionary.builder().checks(checkMappings).build()).withISO8601Dates("yyyy-MM-dd'T'HH:mm'Z'", TimeZone.getTimeZone("UTC")).build());
    asyncAPIDao = mock(DefaultAsyncAPIDAO.class);
    dateUtil = mock(DateUtil.class);
    cleanerThread = new AsyncAPICleanerRunnable(7, elide, 7, asyncAPIDao, dateUtil);
}
Also used : ElideSettingsBuilder(com.yahoo.elide.ElideSettingsBuilder) HashMap(java.util.HashMap) DateUtil(com.yahoo.elide.async.service.DateUtil) HashMapDataStore(com.yahoo.elide.core.datastore.inmemory.HashMapDataStore) AsyncQuery(com.yahoo.elide.async.models.AsyncQuery) Check(com.yahoo.elide.core.security.checks.Check) Elide(com.yahoo.elide.Elide) DefaultAsyncAPIDAO(com.yahoo.elide.async.service.dao.DefaultAsyncAPIDAO) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

Elide (com.yahoo.elide.Elide)1 ElideSettingsBuilder (com.yahoo.elide.ElideSettingsBuilder)1 AsyncQuery (com.yahoo.elide.async.models.AsyncQuery)1 DateUtil (com.yahoo.elide.async.service.DateUtil)1 DefaultAsyncAPIDAO (com.yahoo.elide.async.service.dao.DefaultAsyncAPIDAO)1 HashMapDataStore (com.yahoo.elide.core.datastore.inmemory.HashMapDataStore)1 Check (com.yahoo.elide.core.security.checks.Check)1 HashMap (java.util.HashMap)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1