Numerous times we write Junit tests where we need to create temporary files and folders for executing the testcase. Usually, we create temporary folder at some physical location and write temporary files in it. Major pain in this approach is that we need to take care of creation and cleanup of all such files during the test lifecycle. Junit4 comes with special Rule TemporaryFolder which automatically takes care...
- 17:03
- 1 Comments