1 19 20 package org.netbeans.modules.masterfs; 21 22 import junit.framework.*; 23 import org.netbeans.junit.NbTestCase; 24 25 29 public class ResourcePathTest extends NbTestCase { 30 31 public ResourcePathTest(String testName) { 32 super(testName); 33 } 34 35 protected void setUp() throws Exception { 36 } 37 38 protected void tearDown() throws Exception { 39 } 40 41 public static Test suite() { 42 TestSuite suite = new TestSuite(ResourcePathTest.class); 43 44 return suite; 45 } 46 47 48 public void testGetNameExt() { 49 testComposeNameImpl(new ResourcePath("a.b")); 50 testComposeNameImpl(new ResourcePath(".b")); 51 testComposeNameImpl(new ResourcePath("a.")); 52 } 53 54 55 private void testComposeNameImpl(final ResourcePath fullName) { 56 String ext = fullName.getExt(); 57 String name = fullName.getName(); 58 59 assertEquals(fullName,fullName.getParent().getChild(name,ext)); 60 } 61 62 } 63 | Popular Tags |