<commit_before>package de.retest.recheck.review.ignore.io;

import static org.assertj.core.api.Assertions.assertThat;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

import org.junit.jupiter.api.Test;

import de.retest.recheck.ignore.ShouldIgnore;

class LoadersTest {

	@Test
	void test() {
		final String[] lines = new String[] { //
				"# This is a comment", //
				"matcher: retestid=title, key: font", //
				"matcher: retestid=banner", //
				"matcher: retestid=banner", //
				"matcher: retestid=banner, key: outline", //
		};
		final List<ShouldIgnore> ignores = Loaders.load( Arrays.asList( lines ).stream() ) //
				.filter( ShouldIgnore.class::isInstance ) //
				.map( ShouldIgnore.class::cast ) //
				.collect( Collectors.toList() );
		assertThat( ignores.size() ).isEqualTo( 5 );
	}

}<commit_msg>Add more tests to LoadersTest<commit_after>package de.retest.recheck.review.ignore.io;

import static org.assertj.core.api.Assertions.assertThat;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

import org.junit.jupiter.api.Test;

import de.retest.recheck.ignore.ShouldIgnore;

class LoadersTest {

	@Test
	void test() {
		final String[] lines = new String[] { //
				"# This is a comment", //
				"matcher: retestid=title, key: font", //
				"matcher: retestid=banner", //
				"matcher: retestid=banner", //
				"matcher: retestid=banner, key: outline", //
				"\t ", // this is an empty line with invisible whitespace chars
				"key=outline", //
				"matcher: xpath=/html[1]/div[1]/div[1]/div[1]", //
				"matcher: xpath=/html[1]/div[1]/div[1]/div[2], key: background-url" //
		};
		final List<ShouldIgnore> ignores = Loaders.load( Arrays.asList( lines ).stream() ) //
				.filter( ShouldIgnore.class::isInstance ) //
				.map( ShouldIgnore.class::cast ) //
				.collect( Collectors.toList() );
		assertThat( ignores.size() ).isEqualTo( 8 );

		assertThat( ignores.toString() ).isEqualTo( "[" //
				+ "# This is a comment, " //
				+ "matcher: retestid=title, key: font, " //
				+ "matcher: retestid=banner, " //
				+ "matcher: retestid=banner, " //
				+ "matcher: retestid=banner, key: outline, " //
				+ "key=outline, " //
				+ "matcher: xpath=/html[1]/div[1]/div[1]/div[1], " //
				+ "matcher: xpath=/html[1]/div[1]/div[1]/div[2], key: background-url" //
				+ "]" );
	}

}
{'fraction_non_alphanumeric': 0.18296795952782463, 'fraction_numerical': 0.007588532883642495, 'mean_word_length': 3.2989130434782608, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5628841', 'n_tokens_mistral': 962, 'n_tokens_neox': 853, 'n_words': 163}