Created
March 4, 2019 12:49
-
-
Save eyalgo/7d6b414d5b20041020ef7ebc26adba73 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RuleTest { | |
@Rule | |
public TemporaryFolder tmpFolder = new TemporaryFolder(); | |
@Test | |
public void shouldCreateNewFileInTemporaryFolder() throws IOException { | |
File created = tmpFolder.newFile("file.txt"); | |
assertTrue(created.isFile()); | |
assertEquals(tmpFolder.getRoot(), created.getParentFile()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment