public interface IFeatureManager extends Map<String,Object>
Every class can read a feature by
SpecRunnerService.get(IFeatureManager.class).getFeature("name").
See all IPlugin implementations to check all available features
and how to use them.
| Modifier and Type | Method and Description |
|---|---|
IFeatureManager |
add(String feature,
Object value)
Set a feature to a value.
|
IFeatureManager |
add(String feature,
Object value,
boolean override)
Set a feature to a value.
|
Object |
get(String key,
Object defaultValue)
Get a value from map, if not found, result is 'defaultValue'.
|
IConfiguration |
getConfiguration()
Get configuration.
|
void |
set(String feature,
Object target)
Sets a feature to an object if the feature exists and the type is
compatible.
|
void |
setConfiguration(IConfiguration cfg)
Set a set of local configuration as complementary information to feature
settings.
|
void |
setStrict(String feature,
Object target)
Sets a feature to an object if the feature exists and the type is
compatible.
|
IFeatureManager add(String feature, Object value)
feature - The feature name.value - The value.IFeatureManager add(String feature, Object value, boolean override)
feature - The feature name.value - The value.override - true, if the value should overwrite previous values, false,
otherwise.void set(String feature, Object target)
feature - The feature name.target - The object where the feature must be set.void setStrict(String feature, Object target) throws FeatureManagerException
feature - The feature name.target - The object where the feature must be set.FeatureManagerException - On object setup.void setConfiguration(IConfiguration cfg)
ISpecRunner received a
IConfiguration, this is set here as local and at the
beginning of a new test execution it can be just replaced.cfg - Set configuration features.IConfiguration getConfiguration()
Copyright © 2016. All rights reserved.