Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PortletMockMvcBuilders #11

Open
Condor70 opened this issue Apr 28, 2020 · 1 comment
Open

PortletMockMvcBuilders #11

Condor70 opened this issue Apr 28, 2020 · 1 comment

Comments

@Condor70
Copy link

Condor70 commented Apr 28, 2020

Would it be possible to create a PortletMockMvcBuilders class (and supporting classes) in com.liferay.portletmvc4spring.test with similar features to MockMvcBuilders in spring-test?

There already is an old implementation for portlets, but it is for Spring 3.1.2, from the time MockMvcBuilders was not yet integrated with spring-test (4.2 and up).

@ngriffin7a
Copy link
Member

@Condor70 That's a great feature request! The old implementation you mentioned doesn't seem to be associated with a license, so it could probably only be used as a reference.

We don't have this on the roadmap, so it would have the be a community contribution. If you would like to fork the portletmvc4spring Git repo and build out this feature, I'd be happy to review it with the intent of getting it merged into the com.liferay.portletmvc4spring.test jar. If you decide to pursue this, then I would simply ask that you depend as much as possible from the following packages:

  • org.springframework.test.web.servlet
  • org.springframework.test.web.servlet.request
  • org.springframework.test.web.servlet.result
  • org.springframework.test.web.servlet.setup

In other words, depend-on, re-use, and extend as much as possible. When classes implement or rely on HttpServletRequest, HttpServletResponse, and ServletContext, there wouldn't be much ability to re-use/extend. There would have to be portlet equivalents developed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants