Class HasColumnMatcher
- java.lang.Object
-
- ru.tinkoff.qa.neptune.core.api.steps.SelfDescribed
-
- ru.tinkoff.qa.neptune.core.api.hamcrest.NeptuneFeatureMatcher<T>
-
- ru.tinkoff.qa.neptune.core.api.hamcrest.mapped.MappedDiagnosticFeatureMatcher<Table,String,List<String>>
-
- ru.tinkoff.qa.neptune.selenium.hamcrest.matchers.elements.HasColumnMatcher
-
-
Field Summary
-
Fields inherited from class ru.tinkoff.qa.neptune.core.api.hamcrest.mapped.MappedDiagnosticFeatureMatcher
KEY_MATCHER_MASK, VALUE_MATCHER_MASK
-
Fields inherited from class ru.tinkoff.qa.neptune.core.api.hamcrest.NeptuneFeatureMatcher
expectedTypes, isNullSafe, mismatchDescriptions
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getDescriptionOnKeyAbsence()
Creates description string when there is no key that meets defined criteria for keysprotected String
getDescriptionOnValueMismatch(String s)
Creates description string when value doesn't meet defined criteriaprotected Map<String,List<String>>
getMap(Table table)
Retrieves a target map from checked object.static org.hamcrest.Matcher<Table>
hasAColumn(String column)
Creates an instance ofHasColumnMatcher
that checks columns of theTable
.static org.hamcrest.Matcher<Table>
hasAColumn(String column, String... expectedValues)
Creates an instance ofHasColumnMatcher
that checks columns of theTable
.static org.hamcrest.Matcher<Table>
hasAColumn(String column, org.hamcrest.Matcher<? super List<String>> valuesMatcher)
Creates an instance ofHasColumnMatcher
that checks columns of theTable
.static org.hamcrest.Matcher<Table>
hasAColumn(org.hamcrest.Matcher<? super String> columnMatcher)
Creates an instance ofHasColumnMatcher
that checks columns of theTable
.static org.hamcrest.Matcher<Table>
hasAColumn(org.hamcrest.Matcher<? super String> columnMatcher, String... expectedValues)
Creates an instance ofHasColumnMatcher
that checks columns of theTable
.static org.hamcrest.Matcher<Table>
hasAColumn(org.hamcrest.Matcher<? super String> columnMatcher, org.hamcrest.Matcher<? super List<String>> valuesMatcher)
Creates an instance ofHasColumnMatcher
that checks columns of theTable
.-
Methods inherited from class ru.tinkoff.qa.neptune.core.api.hamcrest.mapped.MappedDiagnosticFeatureMatcher
featureMatches
-
Methods inherited from class ru.tinkoff.qa.neptune.core.api.hamcrest.NeptuneFeatureMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, appendMismatchDescription, appendMismatchDescription, appendMismatchDescription, checkFeature, concatMatcherDescriptions, concatMatcherDescriptions, describeMismatch, describeTo, matches, prerequisiteChecking
-
Methods inherited from class ru.tinkoff.qa.neptune.core.api.steps.SelfDescribed
toString
-
-
-
-
Method Detail
-
hasAColumn
public static org.hamcrest.Matcher<Table> hasAColumn(String column, String... expectedValues)
Creates an instance ofHasColumnMatcher
that checks columns of theTable
. It is expected that the table has a column with a header as it is defined bycolumn
. Also it is expected that a column has values as it is defied byexpectedValues
with the same order.- Parameters:
column
- is header mane of the expected columnexpectedValues
- values of the expected column- Returns:
- created object of
HasColumnMatcher
-
hasAColumn
public static org.hamcrest.Matcher<Table> hasAColumn(org.hamcrest.Matcher<? super String> columnMatcher, String... expectedValues)
Creates an instance ofHasColumnMatcher
that checks columns of theTable
. It is expected that the table has a column with a header that meets the criteria defined bycolumnMatcher
. Also it is expected that a column has values as it is defied byexpectedValues
with the same order.- Parameters:
columnMatcher
- is the criteria to check and find the expected columnexpectedValues
- values of the expected column- Returns:
- created object of
HasColumnMatcher
-
hasAColumn
public static org.hamcrest.Matcher<Table> hasAColumn(String column, org.hamcrest.Matcher<? super List<String>> valuesMatcher)
Creates an instance ofHasColumnMatcher
that checks columns of theTable
. It is expected that the table has a column with a header as it is defined bycolumn
. Also it is expected that a column has values that meet the criteria defined byvaluesMatcher
.- Parameters:
column
- is header mane of the expected columnvaluesMatcher
- is the criteria to check values of the expected column- Returns:
- created object of
HasColumnMatcher
-
hasAColumn
public static org.hamcrest.Matcher<Table> hasAColumn(org.hamcrest.Matcher<? super String> columnMatcher, org.hamcrest.Matcher<? super List<String>> valuesMatcher)
Creates an instance ofHasColumnMatcher
that checks columns of theTable
. It is expected that the table has a column with a header that meets the criteria defined bycolumnMatcher
. Also it is expected that a column has values that meet the criteria defined byvaluesMatcher
.- Parameters:
columnMatcher
- is the criteria to check and find the expected columnvaluesMatcher
- is the criteria to check values of the expected column- Returns:
- created object of
HasColumnMatcher
-
hasAColumn
public static org.hamcrest.Matcher<Table> hasAColumn(org.hamcrest.Matcher<? super String> columnMatcher)
Creates an instance ofHasColumnMatcher
that checks columns of theTable
. It is expected that the table has a column with a header that meets the criteria defined bycolumnMatcher
.- Parameters:
columnMatcher
- is the criteria to check and find the expected column- Returns:
- created object of
HasColumnMatcher
-
hasAColumn
public static org.hamcrest.Matcher<Table> hasAColumn(String column)
Creates an instance ofHasColumnMatcher
that checks columns of theTable
. It is expected that the table has a column with a header as it is defined bycolumn
.- Parameters:
column
- is header mane of the expected column- Returns:
- created object of
HasColumnMatcher
-
getMap
protected Map<String,List<String>> getMap(Table table)
Description copied from class:MappedDiagnosticFeatureMatcher
Retrieves a target map from checked object.
-
getDescriptionOnKeyAbsence
protected String getDescriptionOnKeyAbsence()
Description copied from class:MappedDiagnosticFeatureMatcher
Creates description string when there is no key that meets defined criteria for keys- Specified by:
getDescriptionOnKeyAbsence
in classMappedDiagnosticFeatureMatcher<Table,String,List<String>>
- Returns:
- string description
-
getDescriptionOnValueMismatch
protected String getDescriptionOnValueMismatch(String s)
Description copied from class:MappedDiagnosticFeatureMatcher
Creates description string when value doesn't meet defined criteria- Specified by:
getDescriptionOnValueMismatch
in classMappedDiagnosticFeatureMatcher<Table,String,List<String>>
- Parameters:
s
- is a key value- Returns:
- string description
-
-