- FilePathTest
- 日常茶飯事
- 2010. 5. 23. 15:16
public class FilePathTest { String path = "src/test/FilePathTest.java"; @Test public void testFilePath(){ File file = new File(path); assertTrue(file.exists()); } @Test public void testFilePathEndWithSpace(){ File file = new File(path + " "); assertTrue(file.exists()); } @Test public void testFilePathEndWithTab(){ File file = new File(path + "\t"); assertFalse(file.exists()); } @Test public void testFilePathEndWithEnter(){ File file = new File(path + "\n"); assertFalse(file.exists()); } }
Recent comment