Class NeptuneFeatureMatcher<T>
- java.lang.Object
-
- ru.tinkoff.qa.neptune.core.api.steps.SelfDescribed
-
- ru.tinkoff.qa.neptune.core.api.hamcrest.NeptuneFeatureMatcher<T>
-
- Type Parameters:
T- is a type of checked objects
- All Implemented Interfaces:
org.hamcrest.Matcher<T>,org.hamcrest.SelfDescribing
- Direct Known Subclasses:
AbstractSetOfObjectsMatcher,AlertHasTextMatcher,AllCriteriaMatcher,AnyMatcher,AtThePageMatcher,HasAttributeMatcher,HasBody,HasChildElementMatcher,HasChildElementsMatcher,HasContentMatcher,HasCssValueMatcher,HasHostMatcher,HasLocationMatcher,HasOptionsMatcher,HasPathMatcher,HasPortMatcher,HasPreviousResponse,HasProtocolMatcher,HasQueryStringMatcher,HasReference,HasReferenceMatcher,HasSchemeMatcher,HasSizeMatcher,HasStatusCode,HasTableRowMatcher,HasTextMatcher,HasURI,HasUserInfoMatcher,HasValueMatcher,HasVersion,HttpTrafficHasVersionMatcher,IsElementEnabledMatcher,IsElementVisibleMatcher,IsWindowPresentMatcher,MapEntryMatcher,MappedDiagnosticFeatureMatcher,NotMatcher,OfClassMatcher,OnlyOneMatcher,PojoGetterReturnsMatcher,RequestHasMethod,RequestHasUrl,ResponseHasStatusCode,StringContainsWithSeparator,ThrowableIsCausedByMatcher,ThrowableMessageMatcher,WindowHasPositionMatcher,WindowHasSizeMatcher,WindowHasTitleMatcher
public abstract class NeptuneFeatureMatcher<T> extends SelfDescribed implements org.hamcrest.Matcher<T>
For matchers that check specific objects which are used/supported by Neptune. This is alternative toTypeSafeDiagnosingMatcherandFeatureMatcher
-
-
Field Summary
Fields Modifier and Type Field Description protected Class<? extends T>[]expectedTypesprotected booleanisNullSafeprotected List<org.hamcrest.Description>mismatchDescriptions
-
Constructor Summary
Constructors Modifier Constructor Description protectedNeptuneFeatureMatcher(boolean isNullSafe)protectedNeptuneFeatureMatcher(boolean isNullSafe, Class<? extends T>... expectedTypes)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void_dont_implement_Matcher___instead_extend_BaseMatcher_()protected voidappendMismatchDescription(org.hamcrest.Description description)protected voidappendMismatchDescription(org.hamcrest.Matcher<?> matcher, Object o)protected voidappendMismatchDescription(MismatchDescriber describer)protected booleancheckFeature(Object actual)static StringconcatMatcherDescriptions(String delimiter, org.hamcrest.Matcher<?>... matchers)Concatenates descriptions of matchers into one using a delimiter string.static StringconcatMatcherDescriptions(org.hamcrest.Matcher<?>... matchers)Concatenates descriptions of matchers into one using SPACE as delimiter string.voiddescribeMismatch(Object item, org.hamcrest.Description mismatchDescription)voiddescribeTo(org.hamcrest.Description description)protected abstract booleanfeatureMatches(T toMatch)booleanmatches(Object actual)protected booleanprerequisiteChecking(Object actual)-
Methods inherited from class ru.tinkoff.qa.neptune.core.api.steps.SelfDescribed
toString
-
-
-
-
Constructor Detail
-
NeptuneFeatureMatcher
@SafeVarargs protected NeptuneFeatureMatcher(boolean isNullSafe, Class<? extends T>... expectedTypes)
-
NeptuneFeatureMatcher
protected NeptuneFeatureMatcher(boolean isNullSafe)
-
-
Method Detail
-
concatMatcherDescriptions
public static String concatMatcherDescriptions(String delimiter, org.hamcrest.Matcher<?>... matchers)
Concatenates descriptions of matchers into one using a delimiter string.- Parameters:
delimiter- is a delimiter stringmatchers- are matchers whose string descriptions should be concatenated- Returns:
- a concatenated string
-
concatMatcherDescriptions
public static String concatMatcherDescriptions(org.hamcrest.Matcher<?>... matchers)
Concatenates descriptions of matchers into one using SPACE as delimiter string.- Parameters:
matchers- are matchers whose string descriptions should be concatenated- Returns:
- a concatenated string
-
prerequisiteChecking
protected boolean prerequisiteChecking(Object actual)
-
matches
public boolean matches(Object actual)
- Specified by:
matchesin interfaceorg.hamcrest.Matcher<T>
-
checkFeature
protected boolean checkFeature(Object actual)
-
featureMatches
protected abstract boolean featureMatches(T toMatch)
-
appendMismatchDescription
protected void appendMismatchDescription(MismatchDescriber describer)
-
appendMismatchDescription
protected void appendMismatchDescription(org.hamcrest.Description description)
-
appendMismatchDescription
protected final void appendMismatchDescription(org.hamcrest.Matcher<?> matcher, Object o)
-
describeTo
public final void describeTo(org.hamcrest.Description description)
- Specified by:
describeToin interfaceorg.hamcrest.SelfDescribing
-
describeMismatch
public final void describeMismatch(Object item, org.hamcrest.Description mismatchDescription)
- Specified by:
describeMismatchin interfaceorg.hamcrest.Matcher<T>
-
_dont_implement_Matcher___instead_extend_BaseMatcher_
public void _dont_implement_Matcher___instead_extend_BaseMatcher_()
- Specified by:
_dont_implement_Matcher___instead_extend_BaseMatcher_in interfaceorg.hamcrest.Matcher<T>
-
-