Search in sources :

Example 1 with NamedViewResolver

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

the class GraphSerialisableTest method setUp.

@BeforeEach
public void setUp() throws Exception {
    config = new GraphConfig.Builder().graphId("testGraphId").addHook(new NamedViewResolver()).addHook(new FunctionAuthoriser(FunctionAuthoriserUtil.DEFAULT_UNAUTHORISED_FUNCTIONS)).view(new View.Builder().entity("e1").build()).build();
    schema = new Schema.Builder().entity("e1", new SchemaEntityDefinition.Builder().vertex("string").build()).type("string", String.class).build();
    final StoreProperties storeProperties = new StoreProperties();
    storeProperties.setStoreClass(TestStore.class);
    properties = storeProperties.getProperties();
    expected = new GraphSerialisable.Builder().schema(schema).properties(properties).config(config).build();
}
Also used : Builder(uk.gov.gchq.gaffer.graph.GraphSerialisable.Builder) NamedViewResolver(uk.gov.gchq.gaffer.graph.hook.NamedViewResolver) StoreProperties(uk.gov.gchq.gaffer.store.StoreProperties) View(uk.gov.gchq.gaffer.data.elementdefinition.view.View) Builder(uk.gov.gchq.gaffer.graph.GraphSerialisable.Builder) FunctionAuthoriser(uk.gov.gchq.gaffer.graph.hook.FunctionAuthoriser) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with NamedViewResolver

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

the class MapStorePropertiesGraphSerialisableTest method setUp.

@BeforeEach
public void setUp() throws Exception {
    config = new GraphConfig.Builder().graphId("testGraphId").addHook(new NamedViewResolver()).addHook(new FunctionAuthoriser(FunctionAuthoriserUtil.DEFAULT_UNAUTHORISED_FUNCTIONS)).view(new View.Builder().entity("e1").build()).build();
    schema = new Schema.Builder().entity("e1", new SchemaEntityDefinition.Builder().vertex("string").build()).type("string", String.class).build();
    final MapStoreProperties storeProperties = new MapStoreProperties();
    storeProperties.setStorePropertiesClass(MapStoreProperties.class);
    properties = storeProperties.getProperties();
    expected = getGraphSerialisable();
}
Also used : NamedViewResolver(uk.gov.gchq.gaffer.graph.hook.NamedViewResolver) View(uk.gov.gchq.gaffer.data.elementdefinition.view.View) FunctionAuthoriser(uk.gov.gchq.gaffer.graph.hook.FunctionAuthoriser) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

BeforeEach (org.junit.jupiter.api.BeforeEach)2 View (uk.gov.gchq.gaffer.data.elementdefinition.view.View)2 FunctionAuthoriser (uk.gov.gchq.gaffer.graph.hook.FunctionAuthoriser)2 NamedViewResolver (uk.gov.gchq.gaffer.graph.hook.NamedViewResolver)2 Builder (uk.gov.gchq.gaffer.graph.GraphSerialisable.Builder)1 StoreProperties (uk.gov.gchq.gaffer.store.StoreProperties)1