public class RegularExpressionValueMatcher<T> extends Object implements ValueMatcher<T>
| Constructor and Description |
|---|
RegularExpressionValueMatcher()
Create RegularExpressionValueMatcher in which the pattern the actual
value must match with be specified dynamically from the expected string
passed to this matcher in the equals method.
|
RegularExpressionValueMatcher(String pattern)
Create RegularExpressionValueMatcher with specified pattern.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equal(T actual,
T expected)
Compares the two provided objects whether they are equal.
|
public RegularExpressionValueMatcher()
public RegularExpressionValueMatcher(String pattern) throws IllegalArgumentException
pattern - if non null, regular expression pattern which all actual
values this matcher is applied to must match. If null, this
matcher will apply pattern specified dynamically via the
expected parameter to the equal method.IllegalArgumentException - if pattern is non-null and not a valid regular expression.public boolean equal(T actual, T expected)
ValueMatcherequal in interface ValueMatcher<T>actual - the first object to checkexpected - the object to check the first againstCopyright © 2023. All rights reserved.