use of uk.gov.gchq.gaffer.named.view.DeleteNamedView in project gaffer-doc by gchq.
the class DeleteNamedViewExample method deleteNamedView.
public void deleteNamedView() {
// ---------------------------------------------------------
final DeleteNamedView op = new DeleteNamedView.Builder().name("testNamedView").build();
// ---------------------------------------------------------
showExample(op, null);
}
use of uk.gov.gchq.gaffer.named.view.DeleteNamedView in project Gaffer by gchq.
the class DeleteNamedViewHandlerTest method shouldDeleteNamedViewCorrectly.
@Test
public void shouldDeleteNamedViewCorrectly() throws OperationException, CacheOperationFailedException {
assertTrue(cacheContains(testNamedViewName));
// Given
final DeleteNamedView deleteNamedView = new DeleteNamedView.Builder().name(testNamedViewName).build();
// When
deleteNamedViewHandler.doOperation(deleteNamedView, context, store);
// Then
assertFalse(cacheContains(testNamedViewName));
}
use of uk.gov.gchq.gaffer.named.view.DeleteNamedView in project Gaffer by gchq.
the class DeleteNamedViewHandlerTest method shouldNotThrowExceptionWhenNoNamedViewToDelete.
@Test
public void shouldNotThrowExceptionWhenNoNamedViewToDelete() throws CacheOperationFailedException, OperationException {
assertTrue(cacheContains(testNamedViewName));
// Given
final DeleteNamedView deleteInvalidNamedView = new DeleteNamedView.Builder().name(invalidNamedViewName).build();
// When
deleteNamedViewHandler.doOperation(deleteInvalidNamedView, context, store);
// Then
assertTrue(cacheContains(testNamedViewName));
}
Aggregations