Package org.jboss.forge.addon.resource

Examples of org.jboss.forge.addon.resource.DirectoryResource.mkdir()


      tempDir.deleteOnExit();
      DirectoryResource currentResource = resourceFactory.create(DirectoryResource.class, tempDir);
      Shell shell = test.getShell();
      shell.setCurrentResource(currentResource);
      DirectoryResource child = currentResource.getChildDirectory("Forge 2 Escape");
      child.mkdir();
      child.deleteOnExit();
      Result result = test.execute("cd Forge\\ 2\\ Escape", 10, TimeUnit.SECONDS);
      Assert.assertThat(result.getMessage(), CoreMatchers.nullValue());
      Assert.assertEquals(shell.getCurrentResource(), child);
      currentResource.delete(true);
View Full Code Here


   public void testChangeDirCommand() throws TimeoutException
   {
      File tempDir = OperatingSystemUtils.createTempDir();
      DirectoryResource tempResource = resourceFactory.create(tempDir).reify(DirectoryResource.class);
      DirectoryResource childDirectory = tempResource.getChildDirectory("child");
      childDirectory.mkdir();
      childDirectory.deleteOnExit();
      tempDir.deleteOnExit();

      Shell shell = shellTest.getShell();
      shell.setCurrentResource(tempResource);
View Full Code Here

   public void testListDirCommand() throws TimeoutException
   {
      File tempDir = OperatingSystemUtils.createTempDir();
      DirectoryResource tempResource = resourceFactory.create(tempDir).reify(DirectoryResource.class);
      DirectoryResource childDirectory = tempResource.getChildDirectory("child");
      childDirectory.mkdir();
      childDirectory.deleteOnExit();
      tempDir.deleteOnExit();

      Shell shell = shellTest.getShell();
      shell.setCurrentResource(tempResource);
View Full Code Here

   public void testListAllDirCommand() throws TimeoutException
   {
      File tempDir = OperatingSystemUtils.createTempDir();
      DirectoryResource tempResource = resourceFactory.create(tempDir).reify(DirectoryResource.class);
      DirectoryResource childDirectory = tempResource.getChildDirectory("child");
      childDirectory.mkdir();
      FileResource<?> afile = tempResource.getChild(".afile").reify(FileResource.class);
      afile.createNewFile();
      afile.deleteOnExit();
      childDirectory.deleteOnExit();
      tempDir.deleteOnExit();
View Full Code Here

      {
         @Override
         public Void call() throws Exception
         {
            // NEW EVENT: ResourceCreated
            childDir.mkdir();
            return null;
         }
      }, new Callable<Boolean>()
      {
         @Override
View Full Code Here

      {
         @Override
         public Void call() throws Exception
         {
            // NEW EVENT: ResourceCreated
            childDir.mkdir();
            return null;
         }
      }, new Callable<Boolean>()
      {
         @Override
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.