| パッケージ | 説明 |
|---|---|
| org.springframework.test.web.client | クライアント側の REST テストサポートが含まれています。 |
| org.springframework.test.web.client.match | ビルトイン RequestMatcher 実装が含まれています。 |
| 修飾子と型 | インターフェースと説明 |
|---|---|
interface | RequestExpectationRequestMatcher および ResponseCreator も実装する ResponseActions の拡張 |
| 修飾子と型 | クラスと説明 |
|---|---|
class | DefaultRequestExpectation リクエストマッチャーとそれに含まれるレスポンス作成者に単に委譲する RequestExpectation のデフォルト実装。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
protected java.util.List<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() どんなリクエストにもマッチします。 |
<T> RequestMatcher | XpathRequestMatchers.booleanValue(java.lang.Boolean value)XPath を適用し、見つかったブール値をアサートします。 |
RequestMatcher | ContentRequestMatchers.bytes(byte[] expectedContent) リクエストの本文を指定されたバイト配列と比較します。 |
RequestMatcher | ContentRequestMatchers.contentType(MediaType expectedContentType) リクエストコンテンツ型を MediaType としてアサートします。 |
RequestMatcher | ContentRequestMatchers.contentType(java.lang.String expectedContentType) リクエストのコンテンツ型を文字列としてアサートします。 |
RequestMatcher | ContentRequestMatchers.contentTypeCompatibleWith(MediaType contentType) リクエストコンテンツ型が MediaType.isCompatibleWith(MediaType) で定義されている特定のコンテンツ型と互換性があることをアサートします。 |
RequestMatcher | ContentRequestMatchers.contentTypeCompatibleWith(java.lang.String contentType) リクエストコンテンツ型が MediaType.isCompatibleWith(MediaType) で定義されている特定のコンテンツ型と互換性があることをアサートします。 |
RequestMatcher | JsonPathRequestMatchers.doesNotExist() リクエストコンテンツに対して JSON パス式を評価し、指定されたパスに値が存在しないことを表明します。 |
<T> RequestMatcher | XpathRequestMatchers.doesNotExist() 指定された XPath にコンテンツが存在しないことを表明します。 |
RequestMatcher | JsonPathRequestMatchers.doesNotHaveJsonPath() 提供された content に対して JSON パス式を評価し、null 値を含む値が指定されたパスに存在しないことをアサートします。 |
RequestMatcher | JsonPathRequestMatchers.exists() リクエストのコンテンツに対して JSON パス式を評価し、指定されたパスに null 以外の値が存在することをアサートします。 |
<T> RequestMatcher | XpathRequestMatchers.exists() コンテンツが指定された XPath に存在することを表明します。 |
RequestMatcher | ContentRequestMatchers.formData(MultiValueMap<java.lang.String,java.lang.String> expectedContent) 本体をフォームデータとして解析し、指定された MultiValueMap と比較します。 |
RequestMatcher | JsonPathRequestMatchers.hasJsonPath()JSON パス式をレスポンスコンテンツに対して評価し、値(おそらく null)が存在することをアサートします。 |
static RequestMatcher | MockRestRequestMatchers.header(java.lang.String name, org.hamcrest.Matcher<? super java.lang.String>... matchers) 指定された Hamcrest マッチャーでリクエストヘッダー値をアサートします。 |
static RequestMatcher | MockRestRequestMatchers.header(java.lang.String name, java.lang.String... expectedValues) リクエストヘッダー値をアサートします。 |
RequestMatcher | JsonPathRequestMatchers.isArray() リクエストコンテンツに対して JSON パス式を評価し、結果が配列であることをアサートします。 |
RequestMatcher | JsonPathRequestMatchers.isBoolean() リクエストの内容に対して JSON パス式を評価し、結果が Boolean であることを表明します。 |
RequestMatcher | JsonPathRequestMatchers.isEmpty() リクエストの内容に対して JSON パス式を評価し、指定されたパスに空の値が存在することをアサートします。 |
RequestMatcher | JsonPathRequestMatchers.isMap() リクエストの内容に対して JSON パス式を評価し、結果が Map であることを表明します。 |
RequestMatcher | JsonPathRequestMatchers.isNotEmpty() リクエストのコンテンツに対して JSON パス式を評価し、指定されたパスに空でない値が存在することをアサートします。 |
RequestMatcher | JsonPathRequestMatchers.isNumber() リクエストの内容に対して JSON パス式を評価し、結果が Number であることを表明します。 |
RequestMatcher | JsonPathRequestMatchers.isString() リクエストの内容に対して JSON パス式を評価し、結果が String であることを表明します。 |
RequestMatcher | ContentRequestMatchers.json(java.lang.String expectedJsonContent) 期待される文字列と実際の文字列を JSON として解析し、2 つが「類似している」ことを表明します。 |
RequestMatcher | ContentRequestMatchers.json(java.lang.String expectedJsonContent, boolean strict) リクエストの本文と指定された文字列を JSON として解析し、2 つが「類似している」ことを表明します。 |
static <T> RequestMatcher | MockRestRequestMatchers.jsonPath(java.lang.String expression, org.hamcrest.Matcher<T> matcher)JsonPath 式を使用してボディの特定のサブセットをインスペクションし、JSON パスで見つかった値をアサートするための Hamcrest 一致を使用して、ボディマッチャーをリクエストするアクセス。 |
static RequestMatcher | MockRestRequestMatchers.method(HttpMethod method) リクエストの HttpMethod をアサートします。 |
RequestMatcher | ContentRequestMatchers.node(org.hamcrest.Matcher<? super org.w3c.dom.Node> matcher) リクエストコンテンツを Node として解析し、指定された Matcher を適用します。 |
<T> RequestMatcher | XpathRequestMatchers.node(org.hamcrest.Matcher<? super org.w3c.dom.Node> matcher)XPath を適用し、指定された Matcher<Node> でそれをアサートします。 |
<T> RequestMatcher | XpathRequestMatchers.nodeCount(int expectedCount)XPath を適用し、見つかったノードの数をアサートします。 |
<T> RequestMatcher | XpathRequestMatchers.nodeCount(org.hamcrest.Matcher<java.lang.Integer> matcher)XPath を適用し、指定された Matcher<Integer> で見つかったノードの数をアサートします。 |
RequestMatcher | XpathRequestMatchers.number(java.lang.Double value)XPath を適用し、見つかったノードの数をアサートします。 |
<T> RequestMatcher | XpathRequestMatchers.number(org.hamcrest.Matcher<? super java.lang.Double> matcher)XPath を適用し、指定されたマッチャーで見つかった数をアサートします。 |
static RequestMatcher | MockRestRequestMatchers.queryParam(java.lang.String name, org.hamcrest.Matcher<? super java.lang.String>... matchers) 指定された Hamcrest マッチャーでリクエストクエリパラメーター値をアサートします。 |
static RequestMatcher | MockRestRequestMatchers.queryParam(java.lang.String name, java.lang.String... expectedValues) リクエストクエリパラメーター値をアサートします。 |
static RequestMatcher | MockRestRequestMatchers.requestTo(org.hamcrest.Matcher<java.lang.String> matcher) 指定された Hamcrest マッチャーでリクエスト URI 文字列をアサートします。 |
static RequestMatcher | MockRestRequestMatchers.requestTo(java.lang.String expectedUri) 指定された文字列に一致するリクエスト URI をアサートします。 |
static RequestMatcher | MockRestRequestMatchers.requestTo(java.net.URI uri) 指定された URI へのリクエストを期待します。 |
static RequestMatcher | MockRestRequestMatchers.requestToUriTemplate(java.lang.String expectedUri, java.lang.Object... uriVars) エンコーディングを含む UriComponentsBuilder を介して URI テンプレートとオプション変数から URI を準備する MockRestRequestMatchers.requestTo(URI) のバリアント。 |
RequestMatcher | ContentRequestMatchers.source(org.hamcrest.Matcher<? super javax.xml.transform.Source> matcher) リクエストコンテンツを DOMSource として解析し、指定された Matcher を適用します。 |
RequestMatcher | ContentRequestMatchers.string(org.hamcrest.Matcher<? super java.lang.String> matcher) リクエストの本文を UTF-8 文字列として取得し、指定された Matcher を適用します。 |
<T> RequestMatcher | XpathRequestMatchers.string(org.hamcrest.Matcher<? super java.lang.String> matcher)XPath を適用し、指定されたマッチャーで見つかった String コンテンツをアサートします。 |
RequestMatcher | XpathRequestMatchers.string(java.lang.String value)XPath を適用し、見つかった文字列コンテンツをアサートします。 |
RequestMatcher | ContentRequestMatchers.string(java.lang.String expectedContent) リクエストの本文を UTF-8 文字列として取得し、指定された文字列と比較します。 |
<T> RequestMatcher | JsonPathRequestMatchers.value(org.hamcrest.Matcher<T> matcher) リクエストコンテンツに対して JSON パス式を評価し、指定された Hamcrest Matcher で結果の値をアサートします。 |
<T> RequestMatcher | JsonPathRequestMatchers.value(org.hamcrest.Matcher<T> matcher, java.lang.Class<T> targetType) マッチャーが確実に動作できる結果値のターゲット型も受け入れる JsonPathRequestMatchers.value(Matcher) のオーバーロードされたバリアント。 |
RequestMatcher | JsonPathRequestMatchers.value(java.lang.Object expectedValue) リクエストコンテンツに対して JSON パス式を評価し、結果が提供された値と等しいことをアサートします。 |
RequestMatcher | ContentRequestMatchers.xml(java.lang.String expectedXmlContent) リクエストの本文と指定された文字列を XML として解析し、2 つが「類似している」ことを表明します |