@Override public void bodyContainsJsonPathValueContainingPhrase(String path, String phrase) { Response response = this.facade.response(); assertThat(response, JsonMatchers.containsValueByPath(ResponseContentProvider.INSTANCE, getPath(path), containsString(phrase))); }
@Override public void bodyDoesNotContainPath(String path) { Object value = this.facade.response().body().path(getPath(path)); assertThat(value, nullValue()); }
@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 varAssignedFromProperty(@InflateContext.Ignore String varName, String property) { String value = String.valueOf(this.facade.response().body().<Object>path(getPath(property))); this.world.put(varName, value); }
@Override public void varAssignedFromProperty(@InflateContext.Ignore String varName, String property) { String value = String.valueOf(this.facade.response().body().<Object>path(getPath(property))); this.world.put(varName, value); }
@Override public void bodyContainsArrayWithSize(String path, String size) { Response response = this.facade.response(); assertThat(response, JsonMatchers.containsValueByPath(ResponseContentProvider.INSTANCE, getPath(path), ArrayWithSizeMatcher.arrayWithSize(size))); }
@Override public void bodyContainsPathOfType(String path, String type) { Response response = this.facade.response(); assertThat(response, JsonMatchers.containsValueByPath(ResponseContentProvider.INSTANCE, getPath(path), OfTypeMatcher.ofType(type))); }
@Override public void bodyContainsPathWithOtherValue(String path, String value) { Response response = this.facade.response(); assertThat(response, JsonMatchers.containsValueByPath(ResponseContentProvider.INSTANCE, getPath(path), EqualToIgnoringTypeMatcher.notEqualToIgnoringType(value))); }
@Override public void bodyContainsArrayWithSize(String path, String size) { Response response = this.facade.response(); assertThat(response, JsonMatchers.containsValueByPath(ResponseContentProvider.INSTANCE, getPath(path), ArrayWithSizeMatcher.arrayWithSize(size))); }
@Override public void bodyContainsPathWithOtherValue(String path, String value) { Response response = this.facade.response(); assertThat(response, JsonMatchers.containsValueByPath(ResponseContentProvider.INSTANCE, getPath(path), EqualToIgnoringTypeMatcher.notEqualToIgnoringType(value))); }
@Override public void bodyContainsPathOfType(String path, String type) { Response response = this.facade.response(); assertThat(response, JsonMatchers.containsValueByPath(ResponseContentProvider.INSTANCE, getPath(path), OfTypeMatcher.ofType(type))); }
@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 bodyContainsArrayWithEntryHavingValue(String path, String value) { Response response = this.facade.response(); assertThat(response, JsonMatchers.containsValueByPathInArray(ResponseContentProvider.INSTANCE, getPath(path), EqualToIgnoringTypeMatcher.equalToIgnoringType(value, this.world.getBoolean("case-insensitive")))); }
@Override public void bodyContainsArrayWithObjectHavingProperty(String path, String property, String value) { Response response = this.facade.response(); assertThat(response, containsPropertyValueByPathInArray(ResponseContentProvider.INSTANCE, getPath(path), property, equalToIgnoringType(value, this.world.getBoolean("case-insensitive"))) ); }
@Override public void bodyContainsArrayWithObjectHavingProperty(String path, String property, String value) { Response response = this.facade.response(); assertThat(response, containsPropertyValueByPathInArray(ResponseContentProvider.INSTANCE, getPath(path), property, equalToIgnoringType(value, this.world.getBoolean("case-insensitive"))) ); }
@Override public void bodyContainsPathWithValue(String path, String value) { Response response = this.facade.response(); assertThat(response, JsonMatchers.containsValueByPath(ResponseContentProvider.INSTANCE, getPath(path), EqualToIgnoringTypeMatcher.equalToIgnoringType(value, this.world.getBoolean("case-insensitive")))); }
@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 bodyContainsArrayWithEntryHavingValue(String path, String value) { Response response = this.facade.response(); assertThat(response, JsonMatchers.containsValueByPathInArray(ResponseContentProvider.INSTANCE, getPath(path), EqualToIgnoringTypeMatcher.equalToIgnoringType(value, this.world.getBoolean("case-insensitive")))); }
@Override public void bodyContainsPathWithValue(String path, String value) { Response response = this.facade.response(); assertThat(response, JsonMatchers.containsValueByPath(ResponseContentProvider.INSTANCE, getPath(path), EqualToIgnoringTypeMatcher.equalToIgnoringType(value, this.world.getBoolean("case-insensitive")))); }