public void insertAndAddFeatures() throws Exception { insertAndAdd(points1); insertAndAdd(points2); insertAndAdd(points3); insertAndAdd(lines1); insertAndAdd(lines2); insertAndAdd(lines3); }
@Override protected CLIContextProvider initialValue() { return new CLIContextProvider(); } };
@Given("^the remote repository has changes") public void the_remote_repository_has_changes() throws Throwable { CLIContext remoteRepo = contextProvider.getOrCreateRepositoryContext("remoterepo"); remoteRepo.insertAndAdd(lines3); remoteRepo.runCommand(true, "commit -m Commit10"); }
@Given("^I clone a remote repository$") public void i_clone_a_remote_repository() throws Throwable { there_is_a_remote_repository(); CLIContext remoteRepo = contextProvider.getRepositoryContext("remoterepo"); URI remote = remoteRepo.repositoryURI; URI local = localRepo.repositoryURI; localRepo.runCommand(true, "clone", remote.toString(), local.toString()); localRepo.runCommand(true, "config", "--global", "user.name", "John Doe"); localRepo.runCommand(true, "config", "--global", "user.email", "JohnDoe@example.com"); }
@Given("^I have a repository$") public void I_have_a_repository() throws Throwable { I_have_an_unconfigured_repository(); localRepo.runCommand(true, "config", "--global", "user.name", "John Doe"); localRepo.runCommand(true, "config", "--global", "user.email", "JohnDoe@example.com"); }
/** * Inserts the Feature to the index and stages it to be committed. */ public ObjectId insertAndAdd(Feature f) throws Exception { ObjectId objectId = insert(f); runCommand(true, "add"); return objectId; }
/** * @param commandAndArgs the command and its arguments. This method is dumb, be careful of not * using arguments that shouldn't be split on a space (like "commit -m 'separate words') */ public void runCommand(String commandAndArgs) throws Exception { runCommand(false, commandAndArgs); }
@Given("^the remote repository has changes") public void the_remote_repository_has_changes() throws Throwable { CLIContext remoteRepo = contextProvider.getOrCreateRepositoryContext("remoterepo"); remoteRepo.insertAndAdd(lines3); remoteRepo.runCommand(true, "commit -m Commit10"); }
@Given("^I clone a remote repository$") public void i_clone_a_remote_repository() throws Throwable { there_is_a_remote_repository(); CLIContext remoteRepo = contextProvider.getRepositoryContext("remoterepo"); URI remote = remoteRepo.repositoryURI; URI local = localRepo.repositoryURI; localRepo.runCommand(true, "clone", remote.toString(), local.toString()); localRepo.runCommand(true, "config", "--global", "user.name", "John Doe"); localRepo.runCommand(true, "config", "--global", "user.email", "JohnDoe@example.com"); }
@Given("^I have a repository$") public void I_have_a_repository() throws Throwable { I_have_an_unconfigured_repository(); localRepo.runCommand(true, "config", "--global", "user.name", "John Doe"); localRepo.runCommand(true, "config", "--global", "user.email", "JohnDoe@example.com"); }
/** * Inserts the Feature to the index and stages it to be committed. */ public ObjectId insertAndAdd(Feature f) throws Exception { ObjectId objectId = insert(f); runCommand(true, "add"); return objectId; }
/** * @param commandAndArgs the command and its arguments. This method is dumb, be careful of not * using arguments that shouldn't be split on a space (like "commit -m 'separate words') */ public void runCommand(String commandAndArgs) throws Exception { runCommand(false, commandAndArgs); }
public void insertAndAddFeatures() throws Exception { insertAndAdd(points1); insertAndAdd(points2); insertAndAdd(points3); insertAndAdd(lines1); insertAndAdd(lines2); insertAndAdd(lines3); }
@Override protected CLIContextProvider initialValue() { return new CLIContextProvider(); } };
/** * runs the command, does not fail fast, check {@link CLIContext#exitCode} for the exit code and * {@link GeogigCLI#exception} for any caught exception */ public void runCommand(String... command) throws Exception { runCommand(false, command); }
public void insertAndAddFeatures() throws Exception { insertAndAdd(points1); insertAndAdd(points2); insertAndAdd(points3); insertAndAdd(lines1); insertAndAdd(lines2); insertAndAdd(lines3); }
/** * @param commandAndArgs the command and its arguments. This method is dumb, be careful of not * using arguments that shouldn't be split on a space (like "commit -m 'separate words') */ public void runCommand(String commandAndArgs) throws Exception { runCommand(false, commandAndArgs); }