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.
|
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)
equal
in interface ValueMatcher<T>
Copyright © 2018. All rights reserved.