@@ -30,29 +30,29 @@ class MockMvcResultMatchersDsl internal constructor (private val actions: Result
30
30
/* *
31
31
* @see MockMvcResultMatchers.request
32
32
*/
33
- fun request (matcher : RequestResultMatchers .() -> ResultMatcher ) {
34
- actions.andExpect( MockMvcResultMatchers .request().matcher() )
33
+ fun request (dsl : RequestResultMatchersDsl .() -> Unit ) {
34
+ RequestResultMatchersDsl (actions).dsl( )
35
35
}
36
36
37
37
/* *
38
38
* @see MockMvcResultMatchers.view
39
39
*/
40
- fun view (matcher : ViewResultMatchers .() -> ResultMatcher ) {
41
- actions.andExpect( MockMvcResultMatchers .view().matcher() )
40
+ fun view (dsl : ViewResultMatchersDsl .() -> Unit ) {
41
+ ViewResultMatchersDsl (actions).dsl( )
42
42
}
43
43
44
44
/* *
45
45
* @see MockMvcResultMatchers.model
46
46
*/
47
- fun model (matcher : ModelResultMatchers .() -> ResultMatcher ) {
48
- actions.andExpect( MockMvcResultMatchers .model().matcher() )
47
+ fun model (dsl : ModelResultMatchersDsl .() -> Unit ) {
48
+ ModelResultMatchersDsl (actions).dsl( )
49
49
}
50
50
51
51
/* *
52
52
* @see MockMvcResultMatchers.flash
53
53
*/
54
- fun flash (matcher : FlashAttributeResultMatchers .() -> ResultMatcher ) {
55
- actions.andExpect( MockMvcResultMatchers .flash().matcher() )
54
+ fun flash (dsl : FlashAttributeResultMatchersDsl .() -> Unit ) {
55
+ FlashAttributeResultMatchersDsl (actions).dsl( )
56
56
}
57
57
58
58
/* *
@@ -93,22 +93,22 @@ class MockMvcResultMatchersDsl internal constructor (private val actions: Result
93
93
/* *
94
94
* @see MockMvcResultMatchers.status
95
95
*/
96
- fun status (matcher : StatusResultMatchers .() -> ResultMatcher ) {
97
- actions.andExpect( MockMvcResultMatchers .status().matcher() )
96
+ fun status (dsl : StatusResultMatchersDsl .() -> Unit ) {
97
+ StatusResultMatchersDsl (actions).dsl( )
98
98
}
99
99
100
100
/* *
101
101
* @see MockMvcResultMatchers.header
102
102
*/
103
- fun header (matcher : HeaderResultMatchers .() -> ResultMatcher ) {
104
- actions.andExpect( MockMvcResultMatchers .header().matcher() )
103
+ fun header (dsl : HeaderResultMatchersDsl .() -> Unit ) {
104
+ HeaderResultMatchersDsl (actions).dsl( )
105
105
}
106
106
107
107
/* *
108
108
* @see MockMvcResultMatchers.content
109
109
*/
110
- fun content (matcher : ContentResultMatchers .() -> ResultMatcher ) {
111
- actions.andExpect( MockMvcResultMatchers .content().matcher() )
110
+ fun content (dsl : ContentResultMatchersDsl .() -> Unit ) {
111
+ ContentResultMatchersDsl (actions).dsl( )
112
112
}
113
113
114
114
/* *
@@ -121,23 +121,22 @@ class MockMvcResultMatchersDsl internal constructor (private val actions: Result
121
121
/* *
122
122
* @see MockMvcResultMatchers.jsonPath
123
123
*/
124
- fun jsonPath (expression : String , vararg args : Any , block : JsonPathResultMatchers .() -> ResultMatcher ) {
125
- actions.andExpect( MockMvcResultMatchers .jsonPath( expression, * args).block() )
124
+ fun jsonPath (expression : String , vararg args : Any? , dsl : JsonPathResultMatchersDsl .() -> Unit ) {
125
+ JsonPathResultMatchersDsl (actions, expression, * args).dsl( )
126
126
}
127
127
128
128
/* *
129
129
* @see MockMvcResultMatchers.xpath
130
130
*/
131
- fun xpath (expression : String , vararg args : Any , namespaces : Map <String , String >? = null, xpathInit : XpathResultMatchers .() -> ResultMatcher ) {
132
- actions.andExpect( MockMvcResultMatchers .xpath( expression, namespaces, args).xpathInit() )
131
+ fun xpath (expression : String , vararg args : Any? , namespaces : Map <String , String >? = null, dsl : XpathResultMatchersDsl .() -> Unit ) {
132
+ XpathResultMatchersDsl (actions, expression, namespaces, * args).dsl( )
133
133
}
134
134
135
135
/* *
136
136
* @see MockMvcResultMatchers.cookie
137
137
*/
138
- fun cookie (cookieInit : CookieResultMatchers .() -> ResultMatcher ) {
139
- val cookie = MockMvcResultMatchers .cookie().cookieInit()
140
- actions.andExpect(cookie)
138
+ fun cookie (dsl : CookieResultMatchersDsl .() -> Unit ) {
139
+ CookieResultMatchersDsl (actions).dsl()
141
140
}
142
141
143
142
/* *
0 commit comments