{"id":1596,"date":"2018-04-15T03:29:14","date_gmt":"2018-04-14T18:29:14","guid":{"rendered":"http:\/\/sparkling-software.club\/pekublog\/?page_id=1596"},"modified":"2018-04-16T01:27:10","modified_gmt":"2018-04-15T16:27:10","slug":"requestresultmatchers%e3%81%ae%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89%e4%b8%80%e8%a6%a7","status":"publish","type":"page","link":"http:\/\/sparkling-software.club\/pekublog\/?page_id=1596","title":{"rendered":"RequestResultMatchers\u306e\u30e1\u30bd\u30c3\u30c9\u4e00\u89a7"},"content":{"rendered":"<p>\u25a0RequestResultMatchers\u306e\u30e1\u30bd\u30c3\u30c9\u4e00\u89a7<\/p>\n<table style=\"width: 100%;table-layout: fixed;word-break: break-all;word-wrap: break-all;\">\n<tbody>\n<tr>\n<td>public ResultMatcher asyncStarted()<\/td>\n<td>\u975e\u540c\u671f\u51e6\u7406\u304c\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u304b\u691c\u8a3c\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\u5b9f\u884c\u4f8b\uff09\u975e\u540c\u671f\u51e6\u7406\u304c\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\r\nMockMvc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8.perform(get(&quot;\/&quot;)\r\n    .andExpect(request().asyncStarted());\r\n<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>public ResultMatcher asyncNotStarted()<\/td>\n<td>\u975e\u540c\u671f\u51e6\u7406\u304c\u5b9f\u884c\u3055\u308c\u3066\u3044\u306a\u3044\u304b\u691c\u8a3c\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\u5b9f\u884c\u4f8b\uff09\u975e\u540c\u671f\u51e6\u7406\u304c\u5b9f\u884c\u3055\u308c\u3066\u3044\u306a\u3044\r\nMockMvc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8.perform(get(&quot;\/&quot;)\r\n    .andExpect(request().asyncNotStarted());\r\n<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>public <T> ResultMatcher asyncResult(final Matcher<T> matcher)<\/td>\n<td>\u975e\u540c\u671f\u51e6\u7406\u306e\u7d50\u679c\u3092Matcher\u3092\u4f7f\u3063\u3066\u691c\u8a3c\u3059\u308b<br \/>\u203b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30e1\u30bd\u30c3\u30c9\u306e\u623b\u308a\u5024\u304cCallback or WebAsyncTask\u306e\u5834\u5408\u3060\u3051<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\u5b9f\u884c\u4f8b\uff09\u975e\u540c\u671f\u51e6\u7406\u306e\u7d50\u679c\u304c&quot;Hello&quot;\r\nMockMvc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8.perform(get(&quot;\/&quot;)\r\n    .andExpect(request().asyncResult(is(&quot;Hello&quot;)));\r\n<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>public <T> ResultMatcher asyncResult(final Object expectedResult)<\/td>\n<td>\u975e\u540c\u671f\u51e6\u7406\u306e\u7d50\u679c\u3092\u691c\u8a3c\u3059\u308b<br \/>\u203b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30e1\u30bd\u30c3\u30c9\u306e\u623b\u308a\u5024\u304cCallback or WebAsyncTask\u306e\u5834\u5408\u3060\u3051<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\u5b9f\u884c\u4f8b\uff09\u975e\u540c\u671f\u51e6\u7406\u306e\u7d50\u679c\u304c&quot;Hello&quot; \u203b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30e1\u30bd\u30c3\u30c9\u306e\u623b\u308a\u5024\u304cCallback or WebAsyncTask\u306e\u5834\u5408\u3060\u3051\r\nMockMvc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8.perform(get(&quot;\/&quot;)\r\n    .andExpect(request().asyncResult(&quot;Hello&quot;));\r\n<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>public <T> ResultMatcher attribute(final String name, final Matcher<T> matcher)<\/td>\n<td>\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u542b\u307e\u308c\u308b\u5c5e\u6027\u5024\u3092Matcher\u3092\u4f7f\u3063\u3066\u691c\u8a3c\u3059\u308b<br \/>(Controller\u30e1\u30bd\u30c3\u30c9\u5185\u3067Model\u306b\u8ffd\u52a0\u3057\u305f\u5c5e\u6027)<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\u5b9f\u884c\u4f8b\uff09\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u5c5e\u6027&quot;key&quot;\u304c\u5024&quot;value&quot;\u3067\u542b\u307e\u308c\u308b\r\nMockMvc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8.perform(get(&quot;\/&quot;)\r\n    .andExpect(equest().attribute(&quot;key&quot;, is(&quot;value&quot;)));\r\n<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>public <T> ResultMatcher attribute(final String name, final Object expectedValue)<\/td>\n<td>\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u542b\u307e\u308c\u308b\u5c5e\u6027\u5024\u3092\u691c\u8a3c\u3059\u308b<br \/>(Controller\u30e1\u30bd\u30c3\u30c9\u5185\u3067Model\u306b\u8ffd\u52a0\u3057\u305f\u5c5e\u6027)<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\u5b9f\u884c\u4f8b\uff09\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u5c5e\u6027&quot;key&quot;\u304c\u5024&quot;value&quot;\u3067\u542b\u307e\u308c\u308b\r\nMockMvc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8.perform(get(&quot;\/&quot;)\r\n    .andExpect(equest().attribute(&quot;key&quot;, &quot;value&quot;));\r\n<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>public <T> ResultMatcher sessionAttribute(final String name, final Matcher<T> matcher)<\/td>\n<td>Session\u306b\u542b\u307e\u308c\u308b\u5c5e\u6027\u5024\u3092Matcher\u3092\u4f7f\u3063\u3066\u691c\u8a3c\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\u5b9f\u884c\u4f8b\uff09Session\u306b\u5c5e\u6027&quot;key&quot;\u304c&quot;value&quot;\u3067\u542b\u307e\u308c\u308b\r\nMockMvc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8.perform(get(&quot;\/&quot;)\r\n    .andExpect(equest().sessionAttribute(&quot;key&quot;, is(&quot;value&quot;)));\r\n<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>public <T> ResultMatcher sessionAttribute(final String name, final Object value)<\/td>\n<td>Session\u306b\u542b\u307e\u308c\u308b\u5c5e\u6027\u5024\u3092\u691c\u8a3c\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\u5b9f\u884c\u4f8b\uff09Session\u306b\u5c5e\u6027&quot;key&quot;\u304c&quot;value&quot;\u3067\u542b\u307e\u308c\u308b\r\nMockMvc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8.perform(get(&quot;\/&quot;)\r\n    .andExpect(equest().sessionAttribute(&quot;key&quot;, &quot;value&quot;));\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<fieldset style=\"border-style: solid; border-width: 1px;\">\n<legend><strong>\u5e83\u544a<\/strong><\/legend>\n<p><script src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\" async=\"\"><\/script><!-- \u30ec\u30af\u30bf\u30f3\u30b0\u30eb\u5e83\u544a --> <ins class=\"adsbygoogle\" style=\"display: inline-block; width: 336px; height: 280px;\" data-ad-client=\"ca-pub-0101691122871550\" data-ad-slot=\"7066468215\"><\/ins><script>\/\/ <![CDATA[\n(adsbygoogle = window.adsbygoogle || []).push({});\n\/\/ ]]><\/script><\/fieldset>\n","protected":false},"excerpt":{"rendered":"<p>\u25a0RequestResultMatchers\u306e\u30e1\u30bd\u30c3\u30c9\u4e00\u89a7 public ResultMatcher asyncStarted() \u975e\u540c\u671f\u51e6\u7406\u304c\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u304b\u691c\u8a3c\u3059\u308b public ResultMatcher asyn [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/sparkling-software.club\/pekublog\/index.php?rest_route=\/wp\/v2\/pages\/1596"}],"collection":[{"href":"http:\/\/sparkling-software.club\/pekublog\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/sparkling-software.club\/pekublog\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/sparkling-software.club\/pekublog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/sparkling-software.club\/pekublog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1596"}],"version-history":[{"count":17,"href":"http:\/\/sparkling-software.club\/pekublog\/index.php?rest_route=\/wp\/v2\/pages\/1596\/revisions"}],"predecessor-version":[{"id":1700,"href":"http:\/\/sparkling-software.club\/pekublog\/index.php?rest_route=\/wp\/v2\/pages\/1596\/revisions\/1700"}],"wp:attachment":[{"href":"http:\/\/sparkling-software.club\/pekublog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}