0

How do you mock a file download in MUnit Tests?

I have a REST API that downloads a zip file. When I am writing the munit test for the same, I used the Mock connector to mock the command using readURL().

This however gives me an error since the readURL tries to read the file and gives an error since the path points to a local zip file.

What is the correct command to mock this up?

aled
  • 21,330
  • 3
  • 27
  • 34
Andy
  • 51
  • 1
  • 8
  • Please share your test case and what you tried. – aled Mar 07 '23 at 17:38
  • And what error exactly (add all lines)? If you are mocking a file I would expect it to be read from the file system. What is your expectation exactly for the mock? – aled Mar 07 '23 at 18:44

0 Answers0