use of uk.gov.gchq.gaffer.rest.factory.DefaultGraphFactory in project Gaffer by gchq.
the class DisableOperationsTest method shouldDisableOperationsUsingOperationDeclarations.
@Test
public void shouldDisableOperationsUsingOperationDeclarations() {
Class<? extends Operation>[] disabledOperations = getDisabledOperations();
// Given
System.setProperty(SystemProperty.STORE_PROPERTIES_PATH, storePropsPath.getAbsolutePath());
System.setProperty(SystemProperty.SCHEMA_PATHS, schemaPath.getAbsolutePath());
System.setProperty(SystemProperty.GRAPH_CONFIG_PATH, graphConfigPath.getAbsolutePath());
final DefaultGraphFactory factory = new DefaultGraphFactory();
// When
final Graph graph = factory.createGraph();
// Then
for (final Class<? extends Operation> disabledOperation : disabledOperations) {
assertFalse(graph.isSupported(disabledOperation), disabledOperation.getSimpleName() + " should not be supported");
}
}
Aggregations