Search in sources :

Example 1 with CoreKeyBloomFilterIterator

use of uk.gov.gchq.gaffer.accumulostore.key.core.impl.CoreKeyBloomFilterIterator in project Gaffer by gchq.

the class CoreKeyBloomFilterIteratorTest method shouldThrowExceptionWhenValidateOptionsWithoutBloomFilter.

@Test
public void shouldThrowExceptionWhenValidateOptionsWithoutBloomFilter() throws OperationException, IOException {
    // Given
    final CoreKeyBloomFilterIterator filter = new CoreKeyBloomFilterIterator();
    final Map<String, String> options = new HashMap<>();
    // When / Then
    assertThatExceptionOfType(BloomFilterIteratorException.class).isThrownBy(() -> filter.validateOptions(options)).withMessageContaining(AccumuloStoreConstants.BLOOM_FILTER);
}
Also used : HashMap(java.util.HashMap) CoreKeyBloomFilterIterator(uk.gov.gchq.gaffer.accumulostore.key.core.impl.CoreKeyBloomFilterIterator) Test(org.junit.jupiter.api.Test)

Example 2 with CoreKeyBloomFilterIterator

use of uk.gov.gchq.gaffer.accumulostore.key.core.impl.CoreKeyBloomFilterIterator in project Gaffer by gchq.

the class CoreKeyBloomFilterIteratorTest method shouldValidateOptionsSuccessfully.

@Test
public void shouldValidateOptionsSuccessfully() throws OperationException, IOException {
    // Given
    final CoreKeyBloomFilterIterator filter = new CoreKeyBloomFilterIterator();
    final Map<String, String> options = new HashMap<>();
    options.put(AccumuloStoreConstants.BLOOM_FILTER, "some value");
    // When
    final boolean result = filter.validateOptions(options);
    // Then
    assertTrue(result);
}
Also used : HashMap(java.util.HashMap) CoreKeyBloomFilterIterator(uk.gov.gchq.gaffer.accumulostore.key.core.impl.CoreKeyBloomFilterIterator) Test(org.junit.jupiter.api.Test)

Aggregations

HashMap (java.util.HashMap)2 Test (org.junit.jupiter.api.Test)2 CoreKeyBloomFilterIterator (uk.gov.gchq.gaffer.accumulostore.key.core.impl.CoreKeyBloomFilterIterator)2