パッケージ | 説明 |
---|---|
org.springframework.test.web.client | クライアント側の REST テストサポートが含まれています。 |
org.springframework.test.web.client.match | ビルトイン RequestMatcher 実装が含まれています。 |
修飾子と型 | インターフェースと説明 |
---|---|
interface | RequestExpectation RequestMatcher および ResponseCreator も実装する ResponseActions の拡張 |
修飾子と型 | クラスと説明 |
---|---|
class | DefaultRequestExpectation リクエストマッチャーとそれに含まれるレスポンス作成者に単に委譲する RequestExpectation のデフォルト実装。 |
修飾子と型 | メソッドと説明 |
---|---|
protected ListSE<RequestMatcher> | DefaultRequestExpectation.getRequestMatchers() |
修飾子と型 | メソッドと説明 |
---|---|
ResponseActions | DefaultRequestExpectation.andExpect(RequestMatcher requestMatcher) |
ResponseActions | ResponseActions.andExpect(RequestMatcher requestMatcher) リクエストの期待値を追加します。 |
ResponseActions | MockRestServiceServer.expect(ExpectedCount count, RequestMatcher matcher) リクエストの実行が予想される回数も示す MockRestServiceServer.expect(RequestMatcher) の代替。 |
ResponseActions | MockRestServiceServer.expect(RequestMatcher matcher) 単一の HTTP リクエストに対する期待を設定します。 |
ResponseActions | RequestExpectationManager.expectRequest(ExpectedCount count, RequestMatcher requestMatcher) 新しいリクエストの期待を設定します。 |
ResponseActions | AbstractRequestExpectationManager.expectRequest(ExpectedCount count, RequestMatcher matcher) |
コンストラクターと説明 |
---|
DefaultRequestExpectation(ExpectedCount expectedCount, RequestMatcher requestMatcher) RequestCount で示されるように、何度も呼び出される必要がある新しいリクエストの期待値を作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
static RequestMatcher | MockRestRequestMatchers.anything() どんなリクエストにもマッチします。 |
RequestMatcher | XpathRequestMatchers.booleanValue(BooleanSE value) XPath を適用し、見つかったブール値をアサートします。 |
RequestMatcher | ContentRequestMatchers.bytes(byte[] expectedContent) リクエストの本文を指定されたバイト配列と比較します。 |
RequestMatcher | ContentRequestMatchers.contentType(MediaType expectedContentType) リクエストコンテンツ型を MediaType としてアサートします。 |
RequestMatcher | ContentRequestMatchers.contentType(StringSE expectedContentType) リクエストのコンテンツ型を文字列としてアサートします。 |
RequestMatcher | ContentRequestMatchers.contentTypeCompatibleWith(MediaType contentType) リクエストコンテンツ型が MediaType.isCompatibleWith(MediaType) で定義されている特定のコンテンツ型と互換性があることをアサートします。 |
RequestMatcher | ContentRequestMatchers.contentTypeCompatibleWith(StringSE contentType) リクエストコンテンツ型が MediaType.isCompatibleWith(MediaType) で定義されている特定のコンテンツ型と互換性があることをアサートします。 |
RequestMatcher | JsonPathRequestMatchers.doesNotExist() リクエストコンテンツに対して JSON パス式を評価し、指定されたパスに値が存在しないことを表明します。 |
RequestMatcher | XpathRequestMatchers.doesNotExist() 指定された XPath にコンテンツが存在しないことを表明します。 |
RequestMatcher | JsonPathRequestMatchers.doesNotHaveJsonPath() 提供された content に対して JSON パス式を評価し、null 値を含む値が指定されたパスに存在しないことをアサートします。 |
RequestMatcher | JsonPathRequestMatchers.exists() リクエストのコンテンツに対して JSON パス式を評価し、指定されたパスに null 以外の値が存在することをアサートします。 |
RequestMatcher | XpathRequestMatchers.exists() コンテンツが指定された XPath に存在することを表明します。 |
RequestMatcher | ContentRequestMatchers.formData(MultiValueMap<StringSE, StringSE> expected) 本体をフォームデータとして解析し、指定された MultiValueMap と比較します。 |
RequestMatcher | ContentRequestMatchers.formDataContains(MapSE<StringSE, StringSE> expected) 予想されるフォームパラメーターの指定されたサブセットと一致する ContentRequestMatchers.formData(MultiValueMap) のバリアント。 |
RequestMatcher | JsonPathRequestMatchers.hasJsonPath() JSON パス式をレスポンスコンテンツに対して評価し、値(おそらく null )が存在することをアサートします。 |
static RequestMatcher | MockRestRequestMatchers.header(StringSE name, Matcher<? super StringSE>... matchers) 指定された Hamcrest マッチャーでリクエストヘッダー値をアサートします。 |
static RequestMatcher | MockRestRequestMatchers.header(StringSE name, StringSE... expectedValues) リクエストヘッダー値をアサートします。 |
static RequestMatcher | MockRestRequestMatchers.headerDoesNotExist(StringSE name) 指定されたリクエストヘッダーが存在しないことをアサートします。 |
static RequestMatcher | MockRestRequestMatchers.headerList(StringSE name, Matcher<? super ListSE<StringSE>> matcher) 値の List SE 全体で一致する、指定された Hamcrest マッチャーでリクエストヘッダー値をアサートします。 |
RequestMatcher | JsonPathRequestMatchers.isArray() リクエストコンテンツに対して JSON パス式を評価し、結果が配列であることをアサートします。 |
RequestMatcher | JsonPathRequestMatchers.isBoolean() リクエストのコンテンツに対して JSON パス式を評価し、結果が Boolean SE であることを表明します。 |
RequestMatcher | JsonPathRequestMatchers.isEmpty() リクエストの内容に対して JSON パス式を評価し、指定されたパスに空の値が存在することをアサートします。 |
RequestMatcher | JsonPathRequestMatchers.isMap() リクエストのコンテンツに対して JSON パス式を評価し、結果が Map SE であることを表明します。 |
RequestMatcher | JsonPathRequestMatchers.isNotEmpty() リクエストのコンテンツに対して JSON パス式を評価し、指定されたパスに空でない値が存在することをアサートします。 |
RequestMatcher | JsonPathRequestMatchers.isNumber() リクエストのコンテンツに対して JSON パス式を評価し、結果が Number SE であることを表明します。 |
RequestMatcher | JsonPathRequestMatchers.isString() リクエストのコンテンツに対して JSON パス式を評価し、結果が String SE であることを表明します。 |
RequestMatcher | ContentRequestMatchers.json(StringSE expectedJsonContent) 期待される文字列と実際の文字列を JSON として解析し、2 つが「類似している」ことを表明します。 |
RequestMatcher | ContentRequestMatchers.json(StringSE expectedJsonContent, boolean strict) リクエストの本文と指定された文字列を JSON として解析し、2 つが「類似している」ことを表明します。 |
static <T> RequestMatcher | MockRestRequestMatchers.jsonPath(StringSE expression, Matcher<? super T> matcher) JsonPath 式を使用してボディの特定のサブセットをインスペクションし、JSON パスで見つかった値をアサートするための Hamcrest 一致を使用して、ボディマッチャーをリクエストするアクセス。 |
static RequestMatcher | MockRestRequestMatchers.method(HttpMethod method) リクエストの HttpMethod をアサートします。 |
RequestMatcher | ContentRequestMatchers.multipartData(MultiValueMap<StringSE,?> expectedMap) ボディをマルチパートデータとして解析し、指定された MultiValueMap からの値を正確に含むことをアサートします。 |
RequestMatcher | ContentRequestMatchers.multipartDataContains(MapSE<StringSE,?> expectedMap) ContentRequestMatchers.multipartData(MultiValueMap) のバリアント。同じことを行いますが、実際の値のサブセットのみを対象とします。 |
RequestMatcher | ContentRequestMatchers.node(Matcher<? super NodeSE> matcher) |
RequestMatcher | XpathRequestMatchers.node(Matcher<? super NodeSE> matcher) XPath を適用し、指定された Matcher<Node> でそれをアサートします。 |
RequestMatcher | XpathRequestMatchers.nodeCount(int expectedCount) XPath を適用し、見つかったノードの数をアサートします。 |
RequestMatcher | XpathRequestMatchers.nodeCount(Matcher<? super IntegerSE> matcher) XPath を適用し、指定された Matcher<Integer> で見つかったノードの数をアサートします。 |
RequestMatcher | XpathRequestMatchers.number(DoubleSE value) XPath を適用し、見つかった数値をアサートします。 |
RequestMatcher | XpathRequestMatchers.number(Matcher<? super DoubleSE> matcher) XPath を適用し、指定されたマッチャーで見つかった数をアサートします。 |
static RequestMatcher | MockRestRequestMatchers.queryParam(StringSE name, Matcher<? super StringSE>... matchers) 指定された Hamcrest マッチャーでリクエストクエリパラメーター値をアサートします。 |
static RequestMatcher | MockRestRequestMatchers.queryParam(StringSE name, StringSE... expectedValues) リクエストクエリパラメーター値をアサートします。 |
static RequestMatcher | MockRestRequestMatchers.queryParamList(StringSE name, Matcher<? super ListSE<StringSE>> matcher) 値の List SE 全体で一致する、指定された Hamcrest マッチャーでリクエストクエリパラメーター値をアサートします。 |
static RequestMatcher | MockRestRequestMatchers.requestTo(Matcher<? super StringSE> matcher) 指定された Hamcrest マッチャーでリクエスト URI 文字列をアサートします。 |
static RequestMatcher | MockRestRequestMatchers.requestTo(StringSE expectedUri) 指定された文字列に一致するリクエスト URI をアサートします。 |
static RequestMatcher | MockRestRequestMatchers.requestTo(URISE uri) 指定された URI へのリクエストを期待します。 |
static RequestMatcher | MockRestRequestMatchers.requestToUriTemplate(StringSE expectedUri, ObjectSE... uriVars) エンコーディングを含む UriComponentsBuilder を介して URI テンプレートとオプション変数から URI を準備する MockRestRequestMatchers.requestTo(URI) のバリアント。 |
RequestMatcher | ContentRequestMatchers.source(Matcher<? super SourceSE> matcher) リクエストの内容を DOMSource SE として解析し、指定された Matcher を適用します。 |
RequestMatcher | ContentRequestMatchers.string(Matcher<? super StringSE> matcher) リクエストの本文を UTF-8 文字列として取得し、指定された Matcher を適用します。 |
RequestMatcher | XpathRequestMatchers.string(Matcher<? super StringSE> matcher) XPath を適用し、指定されたマッチャーで見つかった String コンテンツをアサートします。 |
RequestMatcher | ContentRequestMatchers.string(StringSE expectedContent) リクエストの本文を UTF-8 文字列として取得し、指定された文字列と比較します。 |
RequestMatcher | XpathRequestMatchers.string(StringSE content) XPath を適用し、見つかった文字列コンテンツをアサートします。 |
<T> RequestMatcher | JsonPathRequestMatchers.value(Matcher<? super T> matcher) リクエストのコンテンツに対して JSON パス式を評価し、指定された Hamcrest Matcher で結果の値をアサートします。 |
<T> RequestMatcher | JsonPathRequestMatchers.value(Matcher<? super T> matcher, ClassSE<T> targetType) マッチャーが確実に動作できる結果値のターゲット型も受け入れる JsonPathRequestMatchers.value(Matcher) のオーバーロードされたバリアント。 |
RequestMatcher | JsonPathRequestMatchers.value(ObjectSE expectedValue) リクエストコンテンツに対して JSON パス式を評価し、結果が提供された値と等しいことをアサートします。 |
RequestMatcher | ContentRequestMatchers.xml(StringSE expectedXmlContent) リクエストの本文と指定された文字列を XML として解析し、2 つが「類似している」ことを表明します |