use of uk.gov.gchq.gaffer.federatedstore.FederatedStoreProperties in project Gaffer by gchq.
the class FederatedOperationChainValidatorTest method shouldNotErrorWithInvalidViewFromMissingGraph.
@Test
public void shouldNotErrorWithInvalidViewFromMissingGraph() throws OperationException {
// given
String missingGraph = "missingGraph";
final Graph graph = new Graph.Builder().addStoreProperties(new FederatedStoreProperties()).config(new GraphConfig.Builder().graphId("testFedGraph").build()).build();
try {
// when
graph.execute(new GetAllElements.Builder().view(new View.Builder().entity("missingEntity").build()).option(FederatedStoreConstants.KEY_OPERATION_OPTIONS_GRAPH_IDS, missingGraph).build(), new Context());
fail("exception expected");
} catch (final IllegalArgumentException e) {
// then
assertEquals(String.format(FederatedGraphStorage.GRAPH_IDS_NOT_VISIBLE, Lists.newArrayList(missingGraph)), e.getMessage());
}
}
Aggregations