Package com.funnelback.plugin.index.mock
Class MockIndexConfigProviderContext
- java.lang.Object
-
- com.funnelback.plugin.index.mock.MockIndexConfigProviderContext
-
- All Implemented Interfaces:
PluginConfigurationFileSettingMock
,IndexConfigProviderContext
,PluginBaseConfigContext
,PluginBaseConfigFileContext
,PluginBaseContext
public class MockIndexConfigProviderContext extends Object implements IndexConfigProviderContext, PluginConfigurationFileSettingMock
A mockIndexConfigProviderContext
that may be used when testig theIndexingConfigProvider
. Example:MockIndexConfigProviderContext mockContext = new MockIndexConfigProviderContext(); // Set collection or profile config setting 'foo=bar'. mockContext.setConfigSetting("foo", "bar"); // This conext is for a profile and the method being tested needs to know the // profile name, so set that with the mock. mockContext.setProfile(Optional.of("dummy-profile"));
-
-
Field Summary
Fields Modifier and Type Field Description private String
collectionName
private MapBackedConfig
mapBackedConfig
private MapBackedPluginConfigurationFiles
mapBackedPluginConfigurationFiles
private @NonNull Optional<String>
profile
private @NonNull Optional<String>
profileWithView
private File
searchHome
-
Constructor Summary
Constructors Constructor Description MockIndexConfigProviderContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<byte[]>
readCollectionConfigFile(String... pathsBelowConf)
-
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.index.IndexConfigProviderContext
getProfile, getProfileWithView
-
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
-
-
-
-
Field Detail
-
searchHome
private File searchHome
-
collectionName
private String collectionName
-
mapBackedConfig
private final MapBackedConfig mapBackedConfig
-
mapBackedPluginConfigurationFiles
private final MapBackedPluginConfigurationFiles mapBackedPluginConfigurationFiles
-
-
Method Detail
-
readCollectionConfigFile
public Optional<byte[]> readCollectionConfigFile(String... pathsBelowConf)
- Specified by:
readCollectionConfigFile
in interfaceIndexConfigProviderContext
-
-