@Test @DisplayName("match everything except null to empty query") void matchEverythingToEmpty() { Collection<Object> idFilter = Collections.emptyList(); EntityQuery<?> query = createQuery(idFilter, defaultQueryParameters()); EntityQueryMatcher<?> matcher = new EntityQueryMatcher<>(query); assertFalse(matcher.test(null)); assertTrue(matcher.test(EntityRecordWithColumns.of(EntityRecord.getDefaultInstance(), Collections.emptyMap()))); }
@Override public boolean test(@Nullable EntityRecordWithColumns input) { if (input == null) { return false; } boolean result = idMatches(input) && columnValuesMatch(input); return result; }
EntityQueryMatcher implements Predicate<@Nullable EntityRecordWithColumns> { @Override public boolean test(@Nullable EntityRecordWithColumns input) { if (input == null) { return false; } boolean result = idMatches(input) && columnValuesMatch(input); return result; } }
EntityQueryMatcher implements Predicate<@Nullable EntityRecordWithColumns> { @Override public boolean test(@Nullable EntityRecordWithColumns input) { if (input == null) { return false; } boolean result = idMatches(input) && columnValuesMatch(input); return result; } EntityQueryMatcher(EntityQuery<I> query); }
EntityQueryMatcher implements Predicate<@Nullable EntityRecordWithColumns> { @Override public boolean test(@Nullable EntityRecordWithColumns input) { if (input == null) { return false; } boolean result = idMatches(input) && columnValuesMatch(input); return result; } EntityQueryMatcher(EntityQuery<I> query); @Override boolean test(@Nullable EntityRecordWithColumns input); }
EntityQueryMatcher implements Predicate<@Nullable EntityRecordWithColumns> { @Override public boolean test(@Nullable EntityRecordWithColumns input) { if (input == null) { return false; } boolean result = idMatches(input) && columnValuesMatch(input); return result; } EntityQueryMatcher(EntityQuery<I> query); @Override boolean test(@Nullable EntityRecordWithColumns input);  }