@Test void matchesReturnsFalseIfContentIsNotTheSameType() { final List<BodyContent<?>> bodyContents = asList( literalBody(""), stringBody(""), objectBody(emptyMap()) ); bodyContents.forEach(bodyContent -> assertThat(underTest.matches(bodyContent)).isFalse()); }
@Override public boolean matches(Body<?> other) { return other instanceof ArrayBodyContent && listsMatchesRegex(content, ((ArrayBodyContent)other).getContent()); }
ArrayBodyContent extends BodyContent<List<Object>> { @Override public boolean matches(Body<?> other) { return other instanceof ArrayBodyContent && listsMatchesRegex(content, ((ArrayBodyContent)other).getContent()); } }
ArrayBodyContent extends BodyContent<List<Object>> { @Override public boolean matches(Body<?> other) { return other instanceof ArrayBodyContent && listsMatchesRegex(content, ((ArrayBodyContent)other).getContent()); } ArrayBodyContent(List<?> content); }
ArrayBodyContent extends BodyContent<List<Object>> { @Override public boolean matches(Body<?> other) { return other instanceof ArrayBodyContent && listsMatchesRegex(content, ((ArrayBodyContent)other).getContent()); } ArrayBodyContent(List<?> content); @Override boolean matches(Body<?> other); @Override ArrayBodyContent copy(); @Override List<Object> getContent(); @Override BodyContentType getType(); static ArrayBodyContent arrayBody(List<?> content); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
ArrayBodyContent extends BodyContent<List<Object>> { @Override public boolean matches(Body<?> other) { return other instanceof ArrayBodyContent && listsMatchesRegex(content, ((ArrayBodyContent)other).getContent()); } ArrayBodyContent(List<?> content); @Override boolean matches(Body<?> other); @Override ArrayBodyContent copy(); @Override List<Object> getContent(); @Override BodyContentType getType(); static ArrayBodyContent arrayBody(List<?> content); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }