Search in sources :

Example 1 with DeleteNamedView

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);
}
Also used : DeleteNamedView(uk.gov.gchq.gaffer.named.view.DeleteNamedView)

Example 2 with DeleteNamedView

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));
}
Also used : DeleteNamedView(uk.gov.gchq.gaffer.named.view.DeleteNamedView) Test(org.junit.jupiter.api.Test)

Example 3 with DeleteNamedView

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));
}
Also used : DeleteNamedView(uk.gov.gchq.gaffer.named.view.DeleteNamedView) Test(org.junit.jupiter.api.Test)

Aggregations

DeleteNamedView (uk.gov.gchq.gaffer.named.view.DeleteNamedView)3 Test (org.junit.jupiter.api.Test)2