Package org.apache.tinkerpop.gremlin
Annotation Interface FeatureRequirement
@Retention(RUNTIME)
@Target(METHOD)
@Repeatable(FeatureRequirements.class)
public @interface FeatureRequirement
A FeatureRequirement annotation defines a feature to check for a test in the Gremlin Test Suite. The
annotation needs to be added to each test that requires a check for feature support. Multiple sideEffects may
be added for each feature to check.
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.
- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
Nested Class Summary
Nested Classes -
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionThe name of the feature as defined by thepublic static finalmember variable on each FeatureSet implementation.Class<? extends Graph.Features.FeatureSet>The FeatureSet extension interface that owns the feature to be tested. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanDenotes if the test should be executed if the feature is supported or unsupported.
-
Element Details
-
feature
String featureThe name of the feature as defined by thepublic static finalmember variable on each FeatureSet implementation. -
featureClass
Class<? extends Graph.Features.FeatureSet> featureClassThe FeatureSet extension interface that owns the feature to be tested.
-
-
-
supported
boolean supportedDenotes if the test should be executed if the feature is supported or unsupported. By default this value is set to true.- Default:
- true
-