Examples of MkdirTempStore


Examples of org.jboss.virtual.plugins.copy.MkdirTempStore

   public void testCopyMechanism() throws Throwable
   {
      long seed = System.nanoTime();
      URL url = getResource("/vfs/test");
      VFS vfs = VFS.getVFS(url);
      TempStore store = new MkdirTempStore(new DeleteOnExitTempStore(new MockTempStore(seed)));
      vfs.setTempStore(store);
      VirtualFile file = vfs.getChild("jar1.jar");
      VirtualFile temp = VFSUtils.explode(file);
      try
      {
View Full Code Here

Examples of org.jboss.virtual.plugins.copy.MkdirTempStore

   {
      long seed = System.nanoTime();
      URL url = getResource("/vfs/test/nested");
      VFS vfs = VFS.getVFS(url);
      VFSUtils.enableCopy(vfs);
      TempStore store = new MkdirTempStore(new TrackingTempStore(new MockTempStore(seed)));
      try
      {
         vfs.setTempStore(store);
         VirtualFile file = vfs.getChild("nested.jar");
         assertNotNull(file.getChild("complex.jar/subfolder/subchild"));
         try
         {
            File tempRoot = AbstractCopyMechanism.getTempDirectory();
            File test = new File(tempRoot, "complex.jar" + '_' + seed);
            assertTrue(test.exists()); // should be created by MockTS
         }
         finally
         {
            file.cleanup();
         }
      }
      finally
      {
         store.clear();
      }
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.