Search in sources :

Example 6 with Log4jLogger

use of uk.gov.gchq.gaffer.graph.hook.Log4jLogger in project Gaffer by gchq.

the class AddGraphWithHooksTest method shouldShallowCloneOperation.

@Test
@Override
public void shouldShallowCloneOperation() {
    final AddGraphWithHooks a = new Builder().graphId("graphId").parentPropertiesId("testPropID").parentSchemaIds(Lists.newArrayList("testSchemaID")).schema(new Schema.Builder().build()).graphAuths("testAuth").storeProperties(new StoreProperties()).hooks(new Log4jLogger()).disabledByDefault(true).readAccessPredicate(READ_ACCESS_PREDICATE).writeAccessPredicate(WRITE_ACCESS_PREDICATE).build();
    final AddGraphWithHooks b = a.shallowClone();
    assertEquals(a.getGraphId(), b.getGraphId());
    assertEquals(a.getStoreProperties(), b.getStoreProperties());
    assertEquals(a.getSchema(), b.getSchema());
    assertEquals(a.getGraphAuths(), b.getGraphAuths());
    assertArrayEquals(a.getHooks(), b.getHooks());
    assertTrue(b.isDisabledByDefault());
    assertEquals(a.getReadAccessPredicate(), b.getReadAccessPredicate());
    assertEquals(a.getWriteAccessPredicate(), b.getWriteAccessPredicate());
}
Also used : Builder(uk.gov.gchq.gaffer.federatedstore.operation.AddGraphWithHooks.Builder) Schema(uk.gov.gchq.gaffer.store.schema.Schema) StoreProperties(uk.gov.gchq.gaffer.store.StoreProperties) Log4jLogger(uk.gov.gchq.gaffer.graph.hook.Log4jLogger) OperationTest(uk.gov.gchq.gaffer.operation.OperationTest) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)6 Log4jLogger (uk.gov.gchq.gaffer.graph.hook.Log4jLogger)6 StoreProperties (uk.gov.gchq.gaffer.store.StoreProperties)5 GraphHook (uk.gov.gchq.gaffer.graph.hook.GraphHook)4 FunctionAuthoriser (uk.gov.gchq.gaffer.graph.hook.FunctionAuthoriser)3 NamedViewResolver (uk.gov.gchq.gaffer.graph.hook.NamedViewResolver)3 Schema (uk.gov.gchq.gaffer.store.schema.Schema)3 Builder (uk.gov.gchq.gaffer.federatedstore.operation.AddGraphWithHooks.Builder)2 NamedOperationResolver (uk.gov.gchq.gaffer.graph.hook.NamedOperationResolver)2 TestStore (uk.gov.gchq.gaffer.integration.store.TestStore)2 OperationTest (uk.gov.gchq.gaffer.operation.OperationTest)2 Store (uk.gov.gchq.gaffer.store.Store)2 AccumuloProperties (uk.gov.gchq.gaffer.accumulostore.AccumuloProperties)1 Graph (uk.gov.gchq.gaffer.graph.Graph)1 Context (uk.gov.gchq.gaffer.store.Context)1