Wednesday, January 14, 2015

Testing with files and directories in JUnit with @Rule

Testing with Files and directories in JUnit is easy thanks to TemporaryFolder @Rule. In JUnit rules (@Rule) can be used as an alternative or an addition to fixture setup and cleanup methods (org.junit.Before, org.junit.After, org.junit.BeforeClass, and org.junit.AfterClass), but they are more powerful, and can be more easily shared between projects and classes. The code to […]






from Java Code Geeks http://www.javacodegeeks.com/2015/01/testing-with-files-and-directories-in-junit-with-rule.html

No comments:

Post a Comment