Search in sources :

Example 1 with INamedOperationCache

use of uk.gov.gchq.gaffer.named.operation.cache.INamedOperationCache in project Gaffer by gchq.

the class NamedOperationHandlerTest method shouldLoadCacheFromOperationsDeclarationsFile.

@Test
public void shouldLoadCacheFromOperationsDeclarationsFile() throws SerialisationException {
    final InputStream s = StreamUtil.openStream(getClass(), "NamedOperationDeclarations.json");
    final OperationDeclarations deserialised = json.deserialise(s, OperationDeclarations.class);
    INamedOperationCache cache = ((AddNamedOperationHandler) deserialised.getOperations().get(0).getHandler()).getCache();
    assert (cache instanceof MockNamedOperationCache);
}
Also used : InputStream(java.io.InputStream) MockNamedOperationCache(uk.gov.gchq.gaffer.named.operation.cache.MockNamedOperationCache) INamedOperationCache(uk.gov.gchq.gaffer.named.operation.cache.INamedOperationCache) OperationDeclarations(uk.gov.gchq.gaffer.store.operationdeclaration.OperationDeclarations) Test(org.junit.Test)

Aggregations

InputStream (java.io.InputStream)1 Test (org.junit.Test)1 INamedOperationCache (uk.gov.gchq.gaffer.named.operation.cache.INamedOperationCache)1 MockNamedOperationCache (uk.gov.gchq.gaffer.named.operation.cache.MockNamedOperationCache)1 OperationDeclarations (uk.gov.gchq.gaffer.store.operationdeclaration.OperationDeclarations)1