LUCENE-7960: fix Solr test to include mandatory args

This commit is contained in:
David Smiley 2018-06-05 12:30:34 -04:00
parent 7d0b64f9d5
commit c587598096
1 changed files with 4 additions and 2 deletions

View File

@ -72,7 +72,8 @@ public class ResourceLoaderTest extends SolrTestCaseJ4 {
Class<?> clazz = ResourceLoaderAware.class;
// Check ResourceLoaderAware valid objects
assertAwareCompatibility(clazz, new NGramFilterFactory(new HashMap<>()));
//noinspection unchecked
assertAwareCompatibility(clazz, new NGramFilterFactory(map("minGramSize", "1", "maxGramSize", "2")));
assertAwareCompatibility(clazz, new KeywordTokenizerFactory(new HashMap<>()));
// Make sure it throws an error for invalid objects
@ -98,8 +99,9 @@ public class ResourceLoaderTest extends SolrTestCaseJ4 {
assertAwareCompatibility(clazz, new JSONResponseWriter());
// Make sure it throws an error for invalid objects
//noinspection unchecked
invalid = new Object[] {
new NGramFilterFactory(new HashMap<>()),
new NGramFilterFactory(map("minGramSize", "1", "maxGramSize", "2")),
"hello", new Float( 12.3f ),
new KeywordTokenizerFactory(new HashMap<>())
};