1 19 20 package org.openide.filesystems; 21 22 26 public class MemoryFSTestHid extends TestBaseHid { 27 28 29 public MemoryFSTestHid(String testName) { 30 super(testName); 31 } 32 33 protected String [] getResources(String testName) { 34 return new String []{}; 35 } 36 37 38 public void test58331() throws Exception { 39 FileObject p = this.testedFS.getRoot(); 40 FileObject fo = p.createData("test58331"); assertEquals(fo.getParent(), p); 42 String n = fo.getName(); 43 fo.delete(); 44 fo.refresh(); 45 fo.isFolder(); 46 p.createData(n); 47 } 48 49 public void testRootAttributes () throws Exception { 50 FileObject file = FileUtil.createData(this.testedFS.getRoot(), "/folder/file"); 51 assertNotNull(file); 52 FileObject root = this.testedFS.getRoot(); 53 assertNotNull(root); 54 file.setAttribute("name", "value"); 55 assertEquals(file.getAttribute("name"), "value"); 56 root.setAttribute("rootName", "rootValue"); 57 assertEquals(root.getAttribute("rootName"), "rootValue"); 58 } 59 } 60 | Popular Tags |