use of uk.gov.gchq.gaffer.named.view.AddNamedView in project Gaffer by gchq.
the class AddNamedViewHandlerTest method shouldNotAddNestedNamedView.
@Test
public void shouldNotAddNestedNamedView() throws OperationException {
final NamedView nestedNamedView = new NamedView.Builder().name(testNamedViewName + 1).edge(TestGroups.EDGE).build();
addNamedView = new AddNamedView.Builder().name(testNamedViewName).view(nestedNamedView).overwrite(false).build();
try {
handler.doOperation(addNamedView, context, store);
} catch (final OperationException e) {
assertTrue(e.getMessage().equals("NamedView can not be nested within NamedView"));
}
}
use of uk.gov.gchq.gaffer.named.view.AddNamedView in project Gaffer by gchq.
the class AddNamedViewHandlerTest method before.
@BeforeEach
public void before() {
testParameters.put("testParam", TEST_PARAM_VALUE);
view = new View.Builder().edge(TestGroups.EDGE).build();
addNamedView = new AddNamedView.Builder().name(testNamedViewName).view(view).overwrite(false).writeAccessRoles(writeAccessRoles).build();
StoreProperties properties = new StoreProperties();
properties.set("gaffer.cache.service.class", "uk.gov.gchq.gaffer.cache.impl.HashMapCacheService");
CacheServiceLoader.initialise(properties.getProperties());
given(store.getProperties()).willReturn(new StoreProperties());
}
Aggregations