Examples of file()


Examples of org.neo4j.batchimport.utils.Params.file()

        final Params params = new Params("data/dir nodes.csv relationships.csv #nodes #max-props-per-node #usual-rels-pernode #max-rels-per-node #max-props-per-rel rel,types",args);
        if (params.invalid()) {
            System.err.printf("Usage java -jar batchimport.jar %s%n",params);
            System.exit(1);
        }
        File graphDb = params.file("data/dir");
        String nodesFile = params.string("nodes.csv");
        String relationshipsFile = params.string("relationships.csv");

        if (graphDb.exists()) {
            FileUtils.deleteRecursively(graphDb);
View Full Code Here

Examples of org.sonar.api.batch.fs.internal.DeprecatedDefaultInputFile.file()

      langDetection, statusDetection, fs, analysisMode);
    DeprecatedDefaultInputFile inputFile = builder.create(srcFile);
    inputFile = builder.complete(inputFile, InputFile.Type.MAIN);

    assertThat(inputFile.type()).isEqualTo(InputFile.Type.MAIN);
    assertThat(inputFile.file()).isEqualTo(srcFile.getAbsoluteFile());
    assertThat(inputFile.absolutePath()).isEqualTo(PathUtils.sanitize(srcFile.getAbsolutePath()));
    assertThat(inputFile.language()).isEqualTo("java");
    assertThat(inputFile.key()).isEqualTo("struts:src/main/java/foo/Bar.java");
    assertThat(inputFile.relativePath()).isEqualTo("src/main/java/foo/Bar.java");
    assertThat(inputFile.lines()).isEqualTo(1);
View Full Code Here

Examples of org.springframework.test.web.servlet.request.MockMultipartHttpServletRequestBuilder.file()

    request.param("age", "20");
    request.param("admin", "true");
    request.param("salary", "12.3");
    request.param("result", "theResult");

    request.file("fileUpload", "the content of the file".getBytes());

    MvcResult resultMvc = mockMvc.perform(request).andExpect(status().isOk())
        .andExpect(content().contentType("text/html;charset=UTF-8"))
        .andExpect(content().encoding("UTF-8")).andReturn();
View Full Code Here

Examples of org.tmatesoft.hg.core.HgAnnotateCommand.file()

    int rev = cmdLineOpts.getSingleInt(TIP, "-r", "--rev");
    HgAnnotateCommand cmd = repo.createAnnotateCommand();
    AnnotateDumpInspector insp = new AnnotateDumpInspector(cmdLineOpts.getBoolean(false, "-l", "--line-number"));
    cmd.changeset(rev);
    for (String fname : cmdLineOpts.getList("")) {
      cmd.file(Path.create(fname));
      cmd.execute(insp);
    }
  }

  private static class AnnotateDumpInspector implements HgAnnotateCommand.Inspector {
View Full Code Here

Examples of org.tmatesoft.hg.core.HgAnnotateCommand.file()

    final int changeset = TIP;
    AnnotateInspector ai = new AnnotateInspector();

    cmd.changeset(changeset);
    // follow
    cmd.file(fname);
    cmd.execute(ai);
    AnnotateRunner ar = new AnnotateRunner(fname, repo.getWorkingDir());
    ar.run(changeset, true);
    doAnnotateLineCheck(changeset, ar, ai);
   
View Full Code Here

Examples of org.tmatesoft.hg.core.HgAnnotateCommand.file()

    AnnotateRunner ar = new AnnotateRunner(fname, repo.getWorkingDir());
    ar.run(changeset, true);
    doAnnotateLineCheck(changeset, ar, ai);
   
    // no follow
    cmd.file(fname, false);
    ai = new AnnotateInspector();
    cmd.execute(ai);
    ar.run(changeset, false);
    doAnnotateLineCheck(changeset, ar, ai);
  }
View Full Code Here

Examples of org.tmatesoft.hg.core.HgAnnotateCommand.file()

    final String file5AnnotateResult = "0:1:1\n1:2:2x\n4:3:3y\n2:4:z\n5:5:1\n5:6:2x\n5:7:3y\n";
    HgAnnotateCommand cmd = new HgAnnotateCommand(repo);
    cmd.changeset(5);
    AnnotateInspector insp = new AnnotateInspector();
    // file1
    cmd.file(df1, false).execute(insp);
    doAnnotateLineCheck(5, splitLines(file1AnnotateResult), insp);
    // file4
    cmd.file(df4, false).execute(insp = new AnnotateInspector());
    doAnnotateLineCheck(5, splitLines(file4AnnotateResult), insp);
    // file5
View Full Code Here

Examples of org.tmatesoft.hg.core.HgCatCommand.file()

 
  @Test
  public void testCatAtCsetRevision() throws Exception {
    HgCatCommand cmd = new HgCatCommand(repo);
    final Path file = Path.create("src/org/tmatesoft/hg/internal/RevlogStream.java");
    cmd.file(file);
    final Nodeid cset = Nodeid.fromAscii("08db726a0fb7914ac9d27ba26dc8bbf6385a0554");
    cmd.changeset(cset);
    final ByteArrayChannel sink = new ByteArrayChannel();
    cmd.execute(sink);
    final int result1 = sink.toArray().length;
View Full Code Here

Examples of org.tmatesoft.hg.core.HgCatCommand.file()

  public void testRenamedFileInCset() throws Exception {
    repo = Configuration.get().find("log-renames");
    HgCatCommand cmd1 = new HgCatCommand(repo);
    HgCatCommand cmd2 = new HgCatCommand(repo);
    cmd1.file(Path.create("a")); // a is initial b through temporary c
    cmd2.file(Path.create("c"));
    ByteArrayChannel sink1, sink2;
    // a from wc/tip was c in rev 4
    cmd1.changeset(4).execute(sink1 = new ByteArrayChannel());
    cmd2.changeset(4).execute(sink2 = new ByteArrayChannel());
    assertArrayEquals(sink2.toArray(), sink1.toArray());
View Full Code Here

Examples of org.tmatesoft.hg.core.HgCatCommand.file()

    cmd1.changeset(4).execute(sink1 = new ByteArrayChannel());
    cmd2.changeset(4).execute(sink2 = new ByteArrayChannel());
    assertArrayEquals(sink2.toArray(), sink1.toArray());
    //
    // d from wc/tip was a in 0..2 and b in rev 3..4. Besides, there's another d in r4
    cmd2.file(Path.create("d"));
    cmd1.changeset(2).execute(sink1 = new ByteArrayChannel());
    cmd2.changeset(2).execute(sink2 = new ByteArrayChannel());
    assertArrayEquals(sink1.toArray(), sink2.toArray());
    //
    cmd1.file(Path.create("b"));
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.