I have written some business logic for operating on files and I needed to write some integration tests to check whether everything works OK. Because I was short on time I have written simply @BeforeClass and @AfterClass methods which created files and deleted them after tests (I couldn't have used streams because part of functionality was to delete files). Right now I have a bit more time so I am wondering if my solution was that bad because of no mocking? If so, should I have used some implementation of java.nio.file.FileSystem or maybe TemporaryFolder from JUnit would be enough for it to be considered proper test?
Thanks in advance
Aucun commentaire:
Enregistrer un commentaire