package de.retest.recheck.ignore;

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

import java.io.File;
import java.util.List;

import org.junit.jupiter.api.Test;

class SearchFilterFilesTest {

	@Test
	void getDefaultFilterFiles_should_get_all_filter_files_from_classpath() {
		final List<File> defaultFilterFiles = SearchFilterFiles.getDefaultFilterFiles();
		assertThat( defaultFilterFiles.stream().map( File::getName ) ).contains( "positioning.filter",
				"visibility.filter" );
	}
}

@@ -46,450 +46,2115 @@
 tic 
-org.assertj.core.api.Assertions.assertThat;%0A%0Aimport java.io.File;%0Aimport java.util.List;%0A%0Aimport org.junit.jupiter.api.Test;%0A%0Aclass SearchFilterFilesTest %7B%0A%0A%09@Test%0A%09void getDefaultFilterFiles_should_get_all_filter_files_from_classpath() %7B%0A%09%09final List%3CFile%3E defaultFilterFiles = SearchFilterFiles.getDefaultFilterFiles();%0A%09%09assertThat( defaultFilterFiles.stream().map( File::getName ) ).contains( %22positioning.filter%22,%0A%09%09%09%09%22visibility.filter%22
+de.retest.recheck.configuration.ProjectConfiguration.FILTER_FOLDER;%0Aimport static de.retest.recheck.configuration.ProjectConfiguration.RETEST_PROJECT_CONFIG_FOLDER;%0Aimport static de.retest.recheck.configuration.ProjectConfiguration.RETEST_PROJECT_ROOT;%0Aimport static de.retest.recheck.ignore.SearchFilterFiles.FILES_ENDING;%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0Aimport java.io.File;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Path;%0Aimport java.util.List;%0A%0Aimport org.junit.jupiter.api.Test;%0Aimport org.junit.jupiter.api.io.TempDir;%0A%0Aimport de.retest.recheck.util.junit.jupiter.SystemProperty;%0A%0Aclass SearchFilterFilesTest %7B%0A%0A%09@Test%0A%09void getDefaultFilterFiles_should_get_all_filter_files_from_classpath() %7B%0A%09%09final List%3CFile%3E defaultFilterFiles = SearchFilterFiles.getDefaultFilterFiles();%0A%09%09assertThat( defaultFilterFiles.stream().map( File::getName ) ).contains( %22positioning.filter%22,%0A%09%09%09%09%22visibility.filter%22 );%0A%09%7D%0A%0A%09@Test%0A%09@SystemProperty( key = RETEST_PROJECT_ROOT )%0A%09void getProjectFilterFiles_should_only_get_filter_files( @TempDir final Path temp ) throws Exception %7B%0A%09%09final Path configFolder = temp.resolve( RETEST_PROJECT_ROOT );%0A%09%09Files.createDirectory( configFolder );%0A%09%09final Path retestFolder = configFolder.resolve( RETEST_PROJECT_CONFIG_FOLDER );%0A%09%09Files.createDirectory( retestFolder );%0A%09%09final Path filterFolder = retestFolder.resolve( FILTER_FOLDER );%0A%09%09Files.createDirectory( filterFolder );%0A%0A%09%09Files.createTempFile( filterFolder, %22random%22, %22.ignore%22 ).toFile();%0A%09%09final File colorFilter = Files.createTempFile( filterFolder, %22color%22, FILES_ENDING ).toFile();%0A%09%09final File webFontFilter = Files.createTempFile( filterFolder, %22web-font%22, FILES_ENDING ).toFile();%0A%09%09System.setProperty( RETEST_PROJECT_ROOT, filterFolder.toString() );%0A%0A%09%09final List%3CFile%3E projectFilterFiles = SearchFilterFiles.getProjectFilterFiles();%0A%09%09assertThat( projectFilterFiles ).allMatch( file -%3E file.toString().endsWith( FILES_ENDING ) );%0A%09%09assertThat( projectFilterFiles.stream().map( File::getName ) ).contains( colorFilter.getName().toString(),%0A%09%09%09%09webFontFilter.getName().toString()
  );%0A

Test the behavior of the method