Class MockJsoupSetupContext
- java.lang.Object
-
- com.funnelback.common.filter.jsoup.MockJsoupSetupContext
-
- All Implemented Interfaces:
SetupContext
,PluginConfigurationFileSettingMock
,PluginBaseConfigContext
,PluginBaseConfigFileContext
,PluginBaseContext
public class MockJsoupSetupContext extends Object implements SetupContext, PluginConfigurationFileSettingMock
This can be used when testing Jsoup filters that need aSetupContext
. This supports setting the search home, the collection name as well as mocking setting keys in collection.cfg. Example:MockJsoupSetupContext setupContext = new MockJsoupSetupContext(); // Simulate setting keys in collection.cfg setupContext.getConfigSettings().put("myfilter.enable.this", "true"); setupContext.getConfigSettings().put("myfilter.enable.that", "false");
-
-
Field Summary
Fields Modifier and Type Field Description private String
collectionName
private MapBackedConfig
mapBackedConfig
private MapBackedPluginConfigurationFiles
mapBackedPluginConfigurationFiles
private File
searchHome
-
Constructor Summary
Constructors Constructor Description MockJsoupSetupContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
getCollectionConfigFile(String filename)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.funnelback.plugin.PluginBaseConfigContext
getConfigKeysMatchingPattern, getConfigKeysWithPrefix, getConfigSetting
-
Methods inherited from interface com.funnelback.plugin.PluginBaseConfigFileContext
pluginConfigurationFile, pluginConfigurationFileAsBytes
-
Methods inherited from interface com.funnelback.plugin.PluginBaseContext
getCollectionName, getSearchHome
-
Methods inherited from interface com.funnelback.mock.helpers.PluginConfigurationFileSettingMock
setPlugingConfigurationFileContent, setPlugingConfigurationFileContentAsBytes
-
Methods inherited from interface com.funnelback.common.filter.jsoup.SetupContext
setConfigSetting
-
-
-
-
Field Detail
-
searchHome
private File searchHome
-
collectionName
private String collectionName
-
mapBackedConfig
private final MapBackedConfig mapBackedConfig
-
mapBackedPluginConfigurationFiles
private final MapBackedPluginConfigurationFiles mapBackedPluginConfigurationFiles
-
-
Method Detail
-
getCollectionConfigFile
public File getCollectionConfigFile(String filename)
- Specified by:
getCollectionConfigFile
in interfaceSetupContext
-
-