// Make sure it throws an error for invalid objects
Object[] invalid = new Object[] {
// new NGramTokenFilter( null ),
"hello", new Float( 12.3f ),
new LukeRequestHandler(),
new JSONResponseWriter()
};
for( Object obj : invalid ) {
try {
loader.assertAwareCompatibility( clazz, obj );
Assert.fail( "Should be invalid class: "+obj + " FOR " + clazz );
}
catch( SolrException ex ) { } // OK
}
clazz = SolrCoreAware.class;
// Check ResourceLoaderAware valid objects
loader.assertAwareCompatibility( clazz, new LukeRequestHandler() );
loader.assertAwareCompatibility( clazz, new FacetComponent() );
loader.assertAwareCompatibility( clazz, new JSONResponseWriter() );
// Make sure it throws an error for invalid objects
invalid = new Object[] {
new NGramFilterFactory(),
"hello", new Float( 12.3f ),