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 );
	}

}

@@ -545,16 +545,236 @@
 ne%22, //%0A
+%09%09%09%09%22%5Ct %22, // this is an empty line with invisible whitespace chars%0A%09%09%09%09%22key=outline%22, //%0A%09%09%09%09%22matcher: xpath=/html%5B1%5D/div%5B1%5D/div%5B1%5D/div%5B1%5D%22, //%0A%09%09%09%09%22matcher: xpath=/html%5B1%5D/div%5B1%5D/div%5B1%5D/div%5B2%5D, key: background-url%22 //%0A
 %09%09%7D;%0A%09%09f
@@ -1030,9 +1030,445 @@
 To( 
-5
+8 );%0A%0A%09%09assertThat( ignores.toString() ).isEqualTo( %22%5B%22 //%0A%09%09%09%09+ %22# This is a comment, %22 //%0A%09%09%09%09+ %22matcher: retestid=title, key: font, %22 //%0A%09%09%09%09+ %22matcher: retestid=banner, %22 //%0A%09%09%09%09+ %22matcher: retestid=banner, %22 //%0A%09%09%09%09+ %22matcher: retestid=banner, key: outline, %22 //%0A%09%09%09%09+ %22key=outline, %22 //%0A%09%09%09%09+ %22matcher: xpath=/html%5B1%5D/div%5B1%5D/div%5B1%5D/div%5B1%5D, %22 //%0A%09%09%09%09+ %22matcher: xpath=/html%5B1%5D/div%5B1%5D/div%5B1%5D/div%5B2%5D, key: background-url%22 //%0A%09%09%09%09+ %22%5D%22
  );%0A

Add more tests to LoadersTest