Search in sources :

Example 11 with MapFilter

use of uk.gov.gchq.gaffer.function.MapFilter in project Gaffer by gchq.

the class FreqMapIsMoreThanTest method shouldRejectEmptyMaps.

@Test
public void shouldRejectEmptyMaps() {
    // Given
    final MapFilter filter = new MapFilter(KEY1, new IsMoreThan(0L));
    // When
    boolean accepted = filter.isValid(new Object[] { new FreqMap() });
    // Then
    assertFalse(accepted);
}
Also used : FreqMap(uk.gov.gchq.gaffer.types.FreqMap) MapFilter(uk.gov.gchq.gaffer.function.MapFilter) Test(org.junit.Test) FilterFunctionTest(uk.gov.gchq.gaffer.function.FilterFunctionTest)

Aggregations

MapFilter (uk.gov.gchq.gaffer.function.MapFilter)11 Test (org.junit.Test)8 FilterFunctionTest (uk.gov.gchq.gaffer.function.FilterFunctionTest)8 FreqMap (uk.gov.gchq.gaffer.types.FreqMap)3 IsMoreThan (uk.gov.gchq.gaffer.function.filter.IsMoreThan)2 Date (java.util.Date)1 HashMap (java.util.HashMap)1 Exists (uk.gov.gchq.gaffer.function.filter.Exists)1 JSONSerialiser (uk.gov.gchq.gaffer.jsonserialisation.JSONSerialiser)1