1 16 package org.apache.commons.vfs.cache; 17 18 import org.apache.commons.vfs.FileObject; 19 import org.apache.commons.vfs.test.AbstractProviderTestCase; 20 21 26 public class LRUFilesCacheTests extends AbstractProviderTestCase 27 { 28 public void testFilesCache() throws Exception 29 { 30 FileObject scratchFolder = getWriteFolder(); 31 32 FileObject dir1 = scratchFolder.resolveFile("dir1"); 34 35 FileObject dir2 = scratchFolder.resolveFile("dir2"); 37 dir2.getContent(); 38 39 FileObject dir3 = scratchFolder.resolveFile("dir3"); 41 42 FileObject dir4 = scratchFolder.resolveFile("dir4"); 44 45 FileObject dir5 = scratchFolder.resolveFile("dir5"); 47 48 FileObject dir6 = scratchFolder.resolveFile("dir6"); 50 51 FileObject dir7 = scratchFolder.resolveFile("dir7"); 53 54 FileObject dir8 = scratchFolder.resolveFile("dir8"); 56 57 FileObject dir2_2 = scratchFolder.resolveFile("dir2"); 59 assertTrue(dir2 == dir2_2); 60 61 FileObject dir1_2 = scratchFolder.resolveFile("dir1"); 63 assertFalse(dir1 == dir1_2); 64 } 65 } 66 | Popular Tags |