public void assertMessageBodyContainsPathMatchingPattern(String path, String pattern) { assertThat(message, containsValueByPath(MessageWrapperContentProvider.INSTANCE, path, containsPattern(pattern))); }
public static Matcher<CharSequence> matchesPattern(String regex) { return new ContainsPattern(regex, true); }
public void entityHasAttributeWithValueNotMatchingPattern(String attribute, String pattern) { Attribute attr = getNotNullAttribute(attribute); try { NamingEnumeration<?> e = attr.getAll(); while (e.hasMore()) { Object next = e.next(); String s = String.valueOf(next); assertThat(s, not(ContainsPattern.containsPattern(pattern))); } } catch (NamingException ex) { throw new CukesRuntimeException(ex); } }
public static Matcher<CharSequence> matchesPattern(Pattern p) { return new ContainsPattern(p, true); }
public void entityHasAttributeWithValueNotMatchingPattern(String attribute, String pattern) { Attribute attr = getNotNullAttribute(attribute); try { NamingEnumeration<?> e = attr.getAll(); while (e.hasMore()) { Object next = e.next(); String s = String.valueOf(next); assertThat(s, not(ContainsPattern.containsPattern(pattern))); } } catch (NamingException ex) { throw new CukesRuntimeException(ex); } }
public static Matcher<CharSequence> containsPattern(String regex) { return new ContainsPattern(regex, false); }
public void assertMessageBodyContainsPathNotMatchingPattern(String path, String pattern) { assertThat(message, containsValueByPath(MessageWrapperContentProvider.INSTANCE, path, not(containsPattern(pattern)))); } }
public void entityHasAttributeWithValueMatchingPattern(String attribute, String pattern) { Attribute attr = getNotNullAttribute(attribute); Matcher<CharSequence> matcher = ContainsPattern.containsPattern(pattern); try { NamingEnumeration<?> e = attr.getAll(); while (e.hasMore()) { Object next = e.next(); String s = String.valueOf(next); if (matcher.matches(s)) { return; } } } catch (NamingException ex) { throw new CukesRuntimeException(ex); } fail(); }
public void entityHasAttributeWithValueMatchingPattern(String attribute, String pattern) { Attribute attr = getNotNullAttribute(attribute); Matcher<CharSequence> matcher = ContainsPattern.containsPattern(pattern); try { NamingEnumeration<?> e = attr.getAll(); while (e.hasMore()) { Object next = e.next(); String s = String.valueOf(next); if (matcher.matches(s)) { return; } } } catch (NamingException ex) { throw new CukesRuntimeException(ex); } fail(); }
@Override public void bodyContainsPathNotMatchingPattern(String path, String pattern) { Response response = this.facade.response(); assertThat(response, JsonMatchers.containsValueByPath(ResponseContentProvider.INSTANCE, getPath(path), MiscMatchers.that(Matchers.not(ContainsPattern.containsPattern(pattern))))); }
@Override public void bodyContainsPathNotMatchingPattern(String path, String pattern) { Response response = this.facade.response(); assertThat(response, JsonMatchers.containsValueByPath(ResponseContentProvider.INSTANCE, getPath(path), MiscMatchers.that(Matchers.not(ContainsPattern.containsPattern(pattern))))); }
@Override public void bodyContainsPathMatchingPattern(String path, String pattern) { Response response = this.facade.response(); assertThat(response, JsonMatchers.containsValueByPath(ResponseContentProvider.INSTANCE, getPath(path), MiscMatchers.that(ContainsPattern.containsPattern(pattern)))); }
@Override public void bodyContainsPathMatchingPattern(String path, String pattern) { Response response = this.facade.response(); assertThat(response, JsonMatchers.containsValueByPath(ResponseContentProvider.INSTANCE, getPath(path), MiscMatchers.that(ContainsPattern.containsPattern(pattern)))); }