Package org.anchoranalysis.test.feature
Class ConstantsInListFixture
Object
ConstantsInListFixture
A test fixture for creating and validating feature lists with constant values.
This class provides utility methods to create a feature list containing three constant features with predefined values (1.0, 2.0, and 3.0). It also offers a method to check if a results vector matches these expected constant values.
This fixture is useful for testing scenarios where you need a consistent set of features with known constant values, allowing for predictable and easily verifiable results.
Usage example:
FeatureList<MyFeatureInput> featureList = ConstantsInListFixture.create(); // Use the feature list in your test ResultsVector results = // ... calculate results using the feature list ConstantsInListFixture.checkResultsVector(results);
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkResultsVector
(ResultsVector vector) Checks that a result-vector has the results we expect from the feature-list associated with this fixture.static <T extends FeatureInput>
FeatureList<T> create()
Creates a feature-list associated with the fixture.
-
Method Details
-
create
Creates a feature-list associated with the fixture.- Returns:
- a newly created feature-list.
-
checkResultsVector
Checks that a result-vector has the results we expect from the feature-list associated with this fixture.- Parameters:
vector
- the results-vector to check.
-