mock fileupload i.e import using MockSlingHttpServletRequest | Community
Skip to main content
Employee
November 26, 2020
Solved

mock fileupload i.e import using MockSlingHttpServletRequest

  • November 26, 2020
  • 1 reply
  • 1365 views

I need to Mock file import request using MockSlingHttpServletRequest so test my custom code. but I am unable to understand how to do it. if there is any resource available around multipart file upload

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by BrianKasingli

@tasunil1,

Here's an example for JUnit 4: AEM Sling Servlet Unit Test Example Using wcm.io AEM Mocks, Servlet by Resource Type - https://sourcedcode.com/blog/aem/aem-sling-servlet-osgi-r7-by-resource-type-unit-test-junit-4-with-examples

1 reply

BrianKasingli
BrianKasingliAccepted solution
New Participant
November 26, 2020

@tasunil1,

Here's an example for JUnit 4: AEM Sling Servlet Unit Test Example Using wcm.io AEM Mocks, Servlet by Resource Type - https://sourcedcode.com/blog/aem/aem-sling-servlet-osgi-r7-by-resource-type-unit-test-junit-4-with-examples