Examples of FileEntry


Examples of org.eclipse.jgit.treewalk.FileTreeIterator.FileEntry

    git.commit().setMessage("delete file a").call();

    FileUtils.mkdirs(new File(db.getWorkTree(), "a"));
    writeTrashFile("a/c", "Hello world c");

    FileEntry entry = new FileTreeIterator.FileEntry(new File(
        db.getWorkTree(), "a"), db.getFS());
    assertEquals(FileMode.TREE, entry.getMode());

    CheckoutConflictException exception = null;
    try {
      git.checkout().setName(branch_1.getName()).call();
    } catch (CheckoutConflictException e) {
View Full Code Here

Examples of org.eclipse.jgit.treewalk.FileTreeIterator.FileEntry

    assertEquals(FileMode.MISSING, scan.get(0).getNewMode());
    assertEquals(FileMode.TREE, scan.get(0).getOldMode());

    writeTrashFile("a", "b");

    FileEntry entry = new FileTreeIterator.FileEntry(new File(
        db.getWorkTree(), "a"), db.getFS());
    assertEquals(FileMode.REGULAR_FILE, entry.getMode());

    CheckoutConflictException exception = null;
    try {
      git.checkout().setName(branch_1.getName()).call();
    } catch (CheckoutConflictException e) {
View Full Code Here

Examples of org.eclipse.jgit.treewalk.FileTreeIterator.FileEntry

    File fileA = new File(db.getWorkTree(), "a");
    writeTrashFile("a", "b");
    git.add().addFilepattern("a").call();
    git.commit().setMessage("add file a").call();

    FileEntry entry = new FileTreeIterator.FileEntry(new File(
        db.getWorkTree(), "a"), db.getFS());
    assertEquals(FileMode.REGULAR_FILE, entry.getMode());

    FileUtils.delete(fileA);

    git.checkout().setName(branch_1.getName()).call();

    entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"),
        db.getFS());
    assertEquals(FileMode.TREE, entry.getMode());
  }
View Full Code Here

Examples of org.eclipse.jgit.treewalk.FileTreeIterator.FileEntry

    Ref branch_1 = git.branchCreate().setName("branch_1").call();
    writeTrashFile("a", "b");
    git.add().addFilepattern("a").call();
    git.commit().setMessage("add file a").call();

    FileEntry entry = new FileTreeIterator.FileEntry(new File(
        db.getWorkTree(), "a"), db.getFS());
    assertEquals(FileMode.REGULAR_FILE, entry.getMode());

    git.rm().addFilepattern("a").call();
    FileUtils.mkdirs(new File(db.getWorkTree(), "a"));
    writeTrashFile("a/c", "Hello world c");
    git.add().addFilepattern(".").call();

    entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"),
        db.getFS());
    assertEquals(FileMode.TREE, entry.getMode());

    CheckoutConflictException exception = null;
    try {
      git.checkout().setName(branch_1.getName()).call();
    } catch (CheckoutConflictException e) {
View Full Code Here

Examples of org.eclipse.jgit.treewalk.FileTreeIterator.FileEntry

    git.rm().addFilepattern("a").call();
    writeTrashFile("a", "Hello world a");
    git.add().addFilepattern("a").call();
    git.commit().setMessage("add file a").call();

    FileEntry entry = new FileTreeIterator.FileEntry(new File(
        db.getWorkTree(), "a"), db.getFS());
    assertEquals(FileMode.REGULAR_FILE, entry.getMode());

    git.rm().addFilepattern("a").call();
    FileUtils.mkdirs(new File(db.getWorkTree(), "a"));
    writeTrashFile("a/c", "Hello world c");
    git.add().addFilepattern(".").call();

    entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"),
        db.getFS());
    assertEquals(FileMode.TREE, entry.getMode());

    CheckoutConflictException exception = null;
    try {
      git.checkout().setName(branch_1.getName()).call();
    } catch (CheckoutConflictException e) {
View Full Code Here

Examples of org.mockftpserver.fake.filesystem.FileEntry

      fakeFtpServer.setServerControlPort(9879);
      fakeFtpServer.addUserAccount(
                new UserAccount("foo", "foo", "/"));

      FileSystem fileSystem = new UnixFakeFileSystem();
      fileSystem.add(new FileEntry("/products/file1.xml",
         FileUtils.readFileToString(
            new File(
                "src/test/files/suppliers/supplier1/products.xml"))));
        fakeFtpServer.setFileSystem(fileSystem);
        fakeFtpServer.start();
View Full Code Here

Examples of org.mockftpserver.fake.filesystem.FileEntry

        fakeFtpServer.setServerControlPort(9879);
        fakeFtpServer.addUserAccount(new UserAccount("joe", "123456", "/"));

        FileSystem fileSystem = new UnixFakeFileSystem();
        fileSystem.add(new DirectoryEntry("/data/prancingdonkey/catalog"));
        fileSystem.add(new FileEntry("/ftp/incoming/file1.txt", "MULEINACTION"));
        fakeFtpServer.setFileSystem(fileSystem);
        fakeFtpServer.start();
    }
View Full Code Here

Examples of org.ngrinder.script.model.FileEntry

    scriptController.addFolder(getTestUser(), "", path, model);
    // create
    scriptController.createForm(getTestUser(), path, "test.com", "new_file.py", "jython", false,
            new RedirectAttributesModelMap(), model);

    FileEntry script = (FileEntry) model.get("file");
    script.setContent(script.getContent() + "#test comment");
    scriptController.save(getTestUser(), script, null, "", false, model);
    scriptController.validate(getTestUser(), script, "test.com");
    // save and get
    model.clear();
    scriptController.getOne(getTestUser(), script.getPath(), -1L, model);
    FileEntry newScript = (FileEntry) model.get("file");
    assertThat(newScript.getFileName(), is(script.getFileName()));
    assertThat(newScript.getContent(), is(script.getContent()));

    // List<Long> versionList = newScript.getRevisions();
    // reversion list is not implemented yet.
    // assertThat(versionList.size(), is(2));
    model.clear();
View Full Code Here

Examples of org.ngrinder.script.model.FileEntry

    // add folder
    scriptController.addFolder(getTestUser(), "", path, model);
    // create
    scriptController.createForm(getTestUser(), path, "test.com", "file-for-search.py", "jython", false,
            new RedirectAttributesModelMap(), model);
    FileEntry script = (FileEntry) model.get("file");
    scriptController.save(getTestUser(), script, null, "", false, model);

    // save another script
    model.clear();
    script.setPath(script.getPath().replace("file-for-search", "new-file-for-search"));
    scriptController.save(getTestUser(), script, null, "", false, model);
    // save and get
    model.clear();
    scriptController.getOne(getTestUser(), script.getPath(), -1L, model);

    model.clear();
    scriptController.search(getTestUser(), "file-for-search", model);
    Collection<FileEntry> searchResult = (Collection<FileEntry>) model.get("files");
    assertThat(searchResult.size(), is(2));
View Full Code Here

Examples of org.ngrinder.script.model.FileEntry

    String fileName = "download_file.py";
    scriptController.addFolder(getTestUser(), "", path, model);
    RedirectAttributesModelMap attrMap = new RedirectAttributesModelMap();
    scriptController.createForm(getTestUser(), path, "test.com", fileName, "jython", false, attrMap, model);

    FileEntry script = (FileEntry) model.get("file");
    script.setContent(script.getContent() + "#test comment");
    scriptController.save(getTestUser(), script, null, "", false, model);

    scriptController.createForm(getTestUser(), path, "", fileName, "", false, attrMap, model);

    MockHttpServletResponse response = new MockHttpServletResponse();
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.