1 package org.onap.vid.testUtils;
3 import org.hamcrest.Description;
4 import org.hamcrest.TypeSafeMatcher;
6 public class RegExMatcher extends TypeSafeMatcher<String> {
8 private final String regEx;
10 public RegExMatcher(String regEx) {
16 public void describeTo(Description description) {
17 description.appendText("matches regEx="+regEx);
22 protected boolean matchesSafely(String item) {
23 return item.matches(regEx);
26 public static RegExMatcher matchesRegEx(final String regEx) {
27 return new RegExMatcher(regEx);