Class ConfigTestHelpersKt
-
- All Implemented Interfaces:
public final class ConfigTestHelpersKt
-
-
Method Summary
Modifier and Type Method Description final static UnitwithLegacyConfig(String props, String name, Function0<Unit> block)Execute the given block using the props defined by props as a legacy org.jitsi.metaconfig.ConfigSource with name name. final static UnitwithNewConfig(String config, String name, Boolean loadDefaults, Function0<Unit> block)Execute the given block using the config defined by config as a new org.jitsi.metaconfig.ConfigSource, falling back to the defaults if loadDefaults is true, with name name. final static UnitsetNewConfig(String config, Boolean loadDefaults, String name)Creates a TypesafeConfigSource using the parsed value of config and defaults in reference. final static UnitsetLegacyConfig(String props, String name)Creates a ReadOnlyConfigurationService using the parsed value of props with name name and sets it as the underlying source of JitsiConfig.legacyConfig -
-
Method Detail
-
withLegacyConfig
final static Unit withLegacyConfig(String props, String name, Function0<Unit> block)
Execute the given block using the props defined by props as a legacy org.jitsi.metaconfig.ConfigSource with name name. Resets the legacy config to empty after block is executed.
-
withNewConfig
final static Unit withNewConfig(String config, String name, Boolean loadDefaults, Function0<Unit> block)
Execute the given block using the config defined by config as a new org.jitsi.metaconfig.ConfigSource, falling back to the defaults if loadDefaults is true, with name name. Resets the new config to empty after block is executed.
-
setNewConfig
final static Unit setNewConfig(String config, Boolean loadDefaults, String name)
Creates a TypesafeConfigSource using the parsed value of config and defaults in reference.conf if loadDefaults is set with name name and sets it as the underlying source of JitsiConfig.newConfig
-
setLegacyConfig
final static Unit setLegacyConfig(String props, String name)
Creates a ReadOnlyConfigurationService using the parsed value of props with name name and sets it as the underlying source of JitsiConfig.legacyConfig
-
-
-
-