Package org.bladerunnerjs.model

Examples of org.bladerunnerjs.model.App.file()


    assertTrue("root dir is a directory", app.file("root-@dir").isDirectory());
    assertTrue("root text file exists", app.file("root-@dir/root-text-file.txt").exists());
    assertEquals("root text file has correct contents", "this is the root text file (in root @dir)", fileUtil.readFileToString(app.file("root-@dir/root-text-file.txt")));
    assertTrue("root binary file exists", app.file("root-@dir/root-binary-file.bin").exists());
    assertEquals("root binary file has correct contents", "this is the root binary file (in root @dir)", fileUtil.readFileToString(app.file("root-@dir/root-binary-file.bin")));
    assertFalse("hidden file does not exist", app.file("root-@dir/.unix-hidden-file.txt").exists());
   
    assertTrue("child dir exists", app.file("root-@dir/child-@dir").exists());
    assertTrue("child dir is a directory", app.file("root-@dir/child-@dir").isDirectory());
    assertTrue("child text file exists", app.file("root-@dir/child-@dir/child-text-file.txt").exists());
    assertEquals("child text file has correct contents", "this is the child text file (in child @dir)", fileUtil.readFileToString(app.file("root-@dir/child-@dir/child-text-file.txt")));
View Full Code Here


    assertEquals("root text file has correct contents", "this is the root text file (in root @dir)", fileUtil.readFileToString(app.file("root-@dir/root-text-file.txt")));
    assertTrue("root binary file exists", app.file("root-@dir/root-binary-file.bin").exists());
    assertEquals("root binary file has correct contents", "this is the root binary file (in root @dir)", fileUtil.readFileToString(app.file("root-@dir/root-binary-file.bin")));
    assertFalse("hidden file does not exist", app.file("root-@dir/.unix-hidden-file.txt").exists());
   
    assertTrue("child dir exists", app.file("root-@dir/child-@dir").exists());
    assertTrue("child dir is a directory", app.file("root-@dir/child-@dir").isDirectory());
    assertTrue("child text file exists", app.file("root-@dir/child-@dir/child-text-file.txt").exists());
    assertEquals("child text file has correct contents", "this is the child text file (in child @dir)", fileUtil.readFileToString(app.file("root-@dir/child-@dir/child-text-file.txt")));
    assertTrue("child binary file exists", app.file("root-@dir/child-@dir/child-binary-file.bin").exists());
    assertEquals("child binary file has correct contents", "this is the child binary file (in child @dir)", fileUtil.readFileToString(app.file("root-@dir/child-@dir/child-binary-file.bin")));
View Full Code Here

    assertTrue("root binary file exists", app.file("root-@dir/root-binary-file.bin").exists());
    assertEquals("root binary file has correct contents", "this is the root binary file (in root @dir)", fileUtil.readFileToString(app.file("root-@dir/root-binary-file.bin")));
    assertFalse("hidden file does not exist", app.file("root-@dir/.unix-hidden-file.txt").exists());
   
    assertTrue("child dir exists", app.file("root-@dir/child-@dir").exists());
    assertTrue("child dir is a directory", app.file("root-@dir/child-@dir").isDirectory());
    assertTrue("child text file exists", app.file("root-@dir/child-@dir/child-text-file.txt").exists());
    assertEquals("child text file has correct contents", "this is the child text file (in child @dir)", fileUtil.readFileToString(app.file("root-@dir/child-@dir/child-text-file.txt")));
    assertTrue("child binary file exists", app.file("root-@dir/child-@dir/child-binary-file.bin").exists());
    assertEquals("child binary file has correct contents", "this is the child binary file (in child @dir)", fileUtil.readFileToString(app.file("root-@dir/child-@dir/child-binary-file.bin")));
  }
View Full Code Here

    assertEquals("root binary file has correct contents", "this is the root binary file (in root @dir)", fileUtil.readFileToString(app.file("root-@dir/root-binary-file.bin")));
    assertFalse("hidden file does not exist", app.file("root-@dir/.unix-hidden-file.txt").exists());
   
    assertTrue("child dir exists", app.file("root-@dir/child-@dir").exists());
    assertTrue("child dir is a directory", app.file("root-@dir/child-@dir").isDirectory());
    assertTrue("child text file exists", app.file("root-@dir/child-@dir/child-text-file.txt").exists());
    assertEquals("child text file has correct contents", "this is the child text file (in child @dir)", fileUtil.readFileToString(app.file("root-@dir/child-@dir/child-text-file.txt")));
    assertTrue("child binary file exists", app.file("root-@dir/child-@dir/child-binary-file.bin").exists());
    assertEquals("child binary file has correct contents", "this is the child binary file (in child @dir)", fileUtil.readFileToString(app.file("root-@dir/child-@dir/child-binary-file.bin")));
  }
 
View Full Code Here

    assertFalse("hidden file does not exist", app.file("root-@dir/.unix-hidden-file.txt").exists());
   
    assertTrue("child dir exists", app.file("root-@dir/child-@dir").exists());
    assertTrue("child dir is a directory", app.file("root-@dir/child-@dir").isDirectory());
    assertTrue("child text file exists", app.file("root-@dir/child-@dir/child-text-file.txt").exists());
    assertEquals("child text file has correct contents", "this is the child text file (in child @dir)", fileUtil.readFileToString(app.file("root-@dir/child-@dir/child-text-file.txt")));
    assertTrue("child binary file exists", app.file("root-@dir/child-@dir/child-binary-file.bin").exists());
    assertEquals("child binary file has correct contents", "this is the child binary file (in child @dir)", fileUtil.readFileToString(app.file("root-@dir/child-@dir/child-binary-file.bin")));
  }
 
  @Test
View Full Code Here

   
    assertTrue("child dir exists", app.file("root-@dir/child-@dir").exists());
    assertTrue("child dir is a directory", app.file("root-@dir/child-@dir").isDirectory());
    assertTrue("child text file exists", app.file("root-@dir/child-@dir/child-text-file.txt").exists());
    assertEquals("child text file has correct contents", "this is the child text file (in child @dir)", fileUtil.readFileToString(app.file("root-@dir/child-@dir/child-text-file.txt")));
    assertTrue("child binary file exists", app.file("root-@dir/child-@dir/child-binary-file.bin").exists());
    assertEquals("child binary file has correct contents", "this is the child binary file (in child @dir)", fileUtil.readFileToString(app.file("root-@dir/child-@dir/child-binary-file.bin")));
  }
 
  @Test
  public void fileNamesAndContentsCanBeModifiedWhenInstallingTemplate() throws Exception
View Full Code Here

    assertTrue("child dir exists", app.file("root-@dir/child-@dir").exists());
    assertTrue("child dir is a directory", app.file("root-@dir/child-@dir").isDirectory());
    assertTrue("child text file exists", app.file("root-@dir/child-@dir/child-text-file.txt").exists());
    assertEquals("child text file has correct contents", "this is the child text file (in child @dir)", fileUtil.readFileToString(app.file("root-@dir/child-@dir/child-text-file.txt")));
    assertTrue("child binary file exists", app.file("root-@dir/child-@dir/child-binary-file.bin").exists());
    assertEquals("child binary file has correct contents", "this is the child binary file (in child @dir)", fileUtil.readFileToString(app.file("root-@dir/child-@dir/child-binary-file.bin")));
  }
 
  @Test
  public void fileNamesAndContentsCanBeModifiedWhenInstallingTemplate() throws Exception
  {
View Full Code Here

    transformations.put("dir", "folder");
    TemplateUtility.installTemplate(brjs.app("app"), "app", transformations);
   
    assertTrue("app folder exists", app.dirExists());
   
    assertTrue("root folder exists", app.file("root-folder").exists());
    assertTrue("root folder is a directory", app.file("root-folder").isDirectory());
    assertTrue("root text file exists", app.file("root-folder/root-text-file.txt").exists());
    assertEquals("root text file has correct contents", "this is the root text file (in root folder)", fileUtil.readFileToString(app.file("root-folder/root-text-file.txt")));
    assertTrue("root binary file exists", app.file("root-folder/root-binary-file.bin").exists());
    assertEquals("root binary file has correct contents", "this is the root binary file (in root @dir)", fileUtil.readFileToString(app.file("root-folder/root-binary-file.bin")));
View Full Code Here

    TemplateUtility.installTemplate(brjs.app("app"), "app", transformations);
   
    assertTrue("app folder exists", app.dirExists());
   
    assertTrue("root folder exists", app.file("root-folder").exists());
    assertTrue("root folder is a directory", app.file("root-folder").isDirectory());
    assertTrue("root text file exists", app.file("root-folder/root-text-file.txt").exists());
    assertEquals("root text file has correct contents", "this is the root text file (in root folder)", fileUtil.readFileToString(app.file("root-folder/root-text-file.txt")));
    assertTrue("root binary file exists", app.file("root-folder/root-binary-file.bin").exists());
    assertEquals("root binary file has correct contents", "this is the root binary file (in root @dir)", fileUtil.readFileToString(app.file("root-folder/root-binary-file.bin")));
    assertFalse("hidden file does not exist", app.file("root-dir/.unix-hidden-file.txt").exists());
View Full Code Here

   
    assertTrue("app folder exists", app.dirExists());
   
    assertTrue("root folder exists", app.file("root-folder").exists());
    assertTrue("root folder is a directory", app.file("root-folder").isDirectory());
    assertTrue("root text file exists", app.file("root-folder/root-text-file.txt").exists());
    assertEquals("root text file has correct contents", "this is the root text file (in root folder)", fileUtil.readFileToString(app.file("root-folder/root-text-file.txt")));
    assertTrue("root binary file exists", app.file("root-folder/root-binary-file.bin").exists());
    assertEquals("root binary file has correct contents", "this is the root binary file (in root @dir)", fileUtil.readFileToString(app.file("root-folder/root-binary-file.bin")));
    assertFalse("hidden file does not exist", app.file("root-dir/.unix-hidden-file.txt").exists());
   
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.