1 19 20 package org.netbeans.modules.masterfs.filebasedfs.utils; 21 22 import junit.framework.*; 23 import java.io.File ; 24 import org.netbeans.junit.NbTestCase; 25 import org.netbeans.modules.masterfs.filebasedfs.naming.FileNaming; 26 import org.openide.filesystems.FileObject; 27 28 32 public class FileInfoTest extends NbTestCase { 33 34 public FileInfoTest(String testName) { 35 super(testName); 36 } 37 38 protected void setUp() throws Exception { 39 } 40 41 protected void tearDown() throws Exception { 42 } 43 44 public static Test suite() { 45 TestSuite suite = new TestSuite(FileInfoTest.class); 46 47 return suite; 48 } 49 50 public void testComposeName() { 51 testComposeNameImpl("a.b"); 52 testComposeNameImpl(".b"); 53 testComposeNameImpl("a."); 54 } 55 56 57 private void testComposeNameImpl(final String fullName) { 58 String ext = FileInfo.getExt(fullName); 59 String name = FileInfo.getName(fullName); 60 61 assertEquals(fullName,FileInfo.composeName(name, ext)); 62 } 63 } 64 | Popular Tags |