thanksforallthefish
09/22/2021, 2:27 PMfun MockMvc.get(urlTemplate: String, vararg vars: Any?, dsl: MockHttpServletRequestDsl.() -> Unit = {})
I defined my own version
fun MockMvc.get(urlTemplate: String, vararg vars: Any?, subject: Subject = WithMockUser.defaultUser, dsl: MockHttpServletRequestDsl.() -> Unit = {})
in a test, by mistake, I imported both extension function, but when doing mockMvc.get("/uri")
the first one got called. I am curious, how is the order defined in this case? I thought it could be the order of imports, but I tried both combination and the result did not change:
import org.springframework.test.web.servlet.get
import my.own.get
or
import my.own.get
import org.springframework.test.web.servlet.get
made no differenceCLOVIS
09/22/2021, 2:29 PMimport ... as ...
)Joffrey
09/22/2021, 2:29 PMthanksforallthefish
09/22/2021, 2:37 PMthanksforallthefish
09/22/2021, 2:37 PMas
, but in this case I imported the wrong extension and did not realize it