Unit testing code with a file system dependency

前端 未结 11 737
粉色の甜心
粉色の甜心 2020-11-29 16:50

I am writing a component that, given a ZIP file, needs to:

  1. Unzip the file.
  2. Find a specific dll among the unzipped files.
  3. Load that dll thro
11条回答
  •  粉色の甜心
    2020-11-29 17:17

    You should not test class interaction and function calling. instead you should consider integration testing. Test the required result and not the file loading operation.

提交回复
热议问题