You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

VaadinWebSpherePortalRequestTest.java 823B

123456789101112131415161718192021222324
  1. package com.vaadin.server;
  2. import static org.mockito.Mockito.doReturn;
  3. import static org.mockito.Mockito.spy;
  4. import com.vaadin.server.VaadinPortlet.VaadinWebSpherePortalRequest;
  5. public class VaadinWebSpherePortalRequestTest extends
  6. VaadinHttpAndPortletRequestTestBase<VaadinWebSpherePortalRequest> {
  7. @Override
  8. protected VaadinWebSpherePortalRequest createSut() {
  9. VaadinWebSpherePortalRequest request = new VaadinWebSpherePortalRequest(
  10. portletRequest, vaadinPortletService);
  11. // Although partial mocking can be considered a code smell,
  12. // here it's actually quite useful to mock reflection calls.
  13. VaadinWebSpherePortalRequest spy = spy(request);
  14. doReturn(servletRequest).when(spy).getServletRequest(portletRequest);
  15. return spy;
  16. }
  17. }