日常茶飯事 FilePathTest pantarei 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()); } } 저작자표시 비영리 변경금지 (새창열림)