@Retention(value=RUNTIME) @Target(value=METHOD) @Repeatable(value=FeatureRequirements.class) public @interface FeatureRequirement
Tests should not directly test for features using the FeatureSet classes/methods with if/then type statements in the tests themselves as the logic for whether the test gets executed is lost in the code and auto-passes tests when the check for the feature has a negative result. Extracting such logic for feature support for a test into the FeatureRequirement annotation will "ignore" a test rather than pass it, making it easier for implementers to see exactly which tests are being evaluated during test time.
Modifier and Type | Required Element and Description |
---|---|
String |
feature
The name of the feature as defined by the
public static final member variable on each FeatureSet
implementation. |
Class<? extends Graph.Features.FeatureSet> |
featureClass
The FeatureSet extension interface that owns the feature to be tested.
|
Modifier and Type | Optional Element and Description |
---|---|
boolean |
supported
Denotes if the test should be executed if the feature is supported or unsupported.
|
public abstract String feature
public static final
member variable on each FeatureSet
implementation.public abstract Class<? extends Graph.Features.FeatureSet> featureClass
Copyright © 2013–2015 Apache Software Foundation. All rights reserved.