public class

FeatureMatchers

extends Object
java.lang.Object
   ↳ com.atlassian.jira.matchers.FeatureMatchers

Class Overview

A shorthand for building org.hamcrest.FeatureMatcher classes. This uses an accessor to simplify construction. In most cases, the accessor may be expressed as method reference, which greatly simplifies the code.

Summary

Public Constructors
FeatureMatchers()
Public Methods
static <X, Y> FeatureMatcher<X, Y> hasFeature(Function<X, Y> featureAccessor, Matcher<Y> innerMatcher, String featureDescription, String featureName)
Builds a feature matcher using an accessor method to get the feature.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public FeatureMatchers ()

Public Methods

public static FeatureMatcher<X, Y> hasFeature (Function<X, Y> featureAccessor, Matcher<Y> innerMatcher, String featureDescription, String featureName)

Builds a feature matcher using an accessor method to get the feature.

Method name is tailored to static importing.

Parameters
featureAccessor a function, that returns the instance of the feature from the matched object
innerMatcher a matcher for the feature instance
featureDescription Descriptive text to use in describeTo
featureName Identifying text for mismatch message
Returns
  • a feature matcher
See Also
  • org.hamcrest.FeatureMatcher