Search in sources :

Example 21 with Check

use of com.yahoo.elide.core.security.checks.Check in project elide by yahoo.

the class CSVExportFormatterTest method setupMocks.

@BeforeEach
public void setupMocks(@TempDir Path tempDir) {
    dataStore = new HashMapDataStore(DefaultClassScanner.getInstance(), TableExport.class.getPackage());
    Map<String, Class<? extends Check>> map = new HashMap<>();
    elide = new Elide(new ElideSettingsBuilder(dataStore).withEntityDictionary(EntityDictionary.builder().checks(map).build()).withISO8601Dates("yyyy-MM-dd'T'HH:mm'Z'", TimeZone.getTimeZone("UTC")).build());
    elide.doScans();
    scope = mock(RequestScope.class);
}
Also used : ElideSettingsBuilder(com.yahoo.elide.ElideSettingsBuilder) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) HashMapDataStore(com.yahoo.elide.core.datastore.inmemory.HashMapDataStore) Check(com.yahoo.elide.core.security.checks.Check) Elide(com.yahoo.elide.Elide) RequestScope(com.yahoo.elide.core.RequestScope) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 22 with Check

use of com.yahoo.elide.core.security.checks.Check in project elide by yahoo.

the class JSONExportFormatterTest method setupMocks.

@BeforeEach
public void setupMocks(@TempDir Path tempDir) {
    dataStore = new HashMapDataStore(DefaultClassScanner.getInstance(), TableExport.class.getPackage());
    Map<String, Class<? extends Check>> map = new HashMap<>();
    elide = new Elide(new ElideSettingsBuilder(dataStore).withEntityDictionary(EntityDictionary.builder().checks(map).build()).withISO8601Dates("yyyy-MM-dd'T'HH:mm'Z'", TimeZone.getTimeZone("UTC")).build());
    elide.doScans();
    scope = mock(RequestScope.class);
}
Also used : ElideSettingsBuilder(com.yahoo.elide.ElideSettingsBuilder) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) HashMapDataStore(com.yahoo.elide.core.datastore.inmemory.HashMapDataStore) Check(com.yahoo.elide.core.security.checks.Check) Elide(com.yahoo.elide.Elide) RequestScope(com.yahoo.elide.core.RequestScope) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

Check (com.yahoo.elide.core.security.checks.Check)22 HashMap (java.util.HashMap)17 ElideSettingsBuilder (com.yahoo.elide.ElideSettingsBuilder)13 BeforeEach (org.junit.jupiter.api.BeforeEach)11 Elide (com.yahoo.elide.Elide)9 RequestScope (com.yahoo.elide.core.RequestScope)8 HashMapDataStore (com.yahoo.elide.core.datastore.inmemory.HashMapDataStore)8 EntityDictionary (com.yahoo.elide.core.dictionary.EntityDictionary)8 Role (com.yahoo.elide.core.security.checks.prefab.Role)6 FilterExpressionCheck (com.yahoo.elide.core.security.checks.FilterExpressionCheck)5 AsyncQuery (com.yahoo.elide.async.models.AsyncQuery)4 Injector (com.yahoo.elide.core.dictionary.Injector)4 FilterExpression (com.yahoo.elide.core.filter.expression.FilterExpression)4 User (com.yahoo.elide.core.security.User)4 UserCheck (com.yahoo.elide.core.security.checks.UserCheck)4 Type (com.yahoo.elide.core.type.Type)4 DefaultAsyncAPIDAO (com.yahoo.elide.async.service.dao.DefaultAsyncAPIDAO)3 FileResultStorageEngine (com.yahoo.elide.async.service.storageengine.FileResultStorageEngine)3 DataStoreTransaction (com.yahoo.elide.core.datastore.DataStoreTransaction)3 OrFilterExpression (com.yahoo.elide.core.filter.expression.OrFilterExpression)3