<commit_before>package org.helianto.core.filter;

import static org.junit.Assert.assertEquals;

import org.helianto.core.criteria.CriteriaBuilder;
import org.junit.Test;

/**
 * 
 * @author mauriciofernandesdecastro
 */
public class SerarchFilterTests {
	
	@SuppressWarnings("serial")
	@Test
	public void filter() {
		AbstractFilter sourceFilter = new AbstractFilter() {
			@Override public String createSelectAsString() { return "SELECT STRING"; }
			public void reset() { }
			@Override protected void doSelect(CriteriaBuilder mainCriteriaBuilder) {}
			@Override public void doFilter(CriteriaBuilder mainCriteriaBuilder) { }
			@Override public void preProcessFilter(CriteriaBuilder mainCriteriaBuilder) {
				mainCriteriaBuilder.appendSegment("uniqueField", "=").appendString("key");
			}
		};
		AbstractSearchFilter filter = new AbstractSearchFilter(sourceFilter) {<commit_msg>Tests.<commit_after>package org.helianto.core.filter;

import static org.junit.Assert.assertEquals;

import org.helianto.core.criteria.CriteriaBuilder;
import org.junit.Test;

/**
 * 
 * @author mauriciofernandesdecastro
 */
public class SerarchFilterTests {
	
	@SuppressWarnings("serial")
	@Test
	public void filter() {
		AbstractFilter sourceFilter = new AbstractFilter() {
			@Override public String createSelectAsString() { return "SELECT STRING"; }
			public void reset() { }
			@Override protected void doSelect(CriteriaBuilder mainCriteriaBuilder) {}
			@Override public void doFilter(CriteriaBuilder mainCriteriaBuilder) { }
			@Override public void preProcessFilter(CriteriaBuilder mainCriteriaBuilder) {
				mainCriteriaBuilder.appendSegment("uniqueField", "=").appendString("key");
			}
		};
		SearchFilter filter = new SearchFilter(sourceFilter) {
{'fraction_non_alphanumeric': 0.10281447443997703, 'fraction_numerical': 0.0, 'mean_word_length': 5.7, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5631234', 'n_tokens_mistral': 511, 'n_tokens_neox': 472, 'n_words': 108}