You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's currently not supported to use java config out of the box.
You need to pass the mocks created from Spring to the TestExecutor which is only possible by a custom implementation of IProcessingContextBuilder:
And this is where the trouble begins: You cannot simply extend from SpringWebProcessingContextBuilder as most of the methods createApplicationContext, createMockServletContext, createMockHttpServletRequest, createMockHttpServletResponse are final and the ServletWebRequest will be initialized directly in doAdditionalVariableProcessing instead of an own method.
So I ended up in copying all the stuff of the classes which works but is really ugly:
It's currently not supported to use java config out of the box.
You need to pass the mocks created from Spring to the TestExecutor which is only possible by a custom implementation of
IProcessingContextBuilder
:And this is where the trouble begins: You cannot simply extend from
SpringWebProcessingContextBuilder
as most of the methodscreateApplicationContext
,createMockServletContext
,createMockHttpServletRequest
,createMockHttpServletResponse
are final and theServletWebRequest
will be initialized directly indoAdditionalVariableProcessing
instead of an own method.So I ended up in copying all the stuff of the classes which works but is really ugly:
The text was updated successfully, but these errors were encountered: