Ejemplo n.º 1
0
  @Before
  public void setUp() throws IOException {
    Injector i =
        Guice.createInjector(Modules.override(new GeogitModule()).with(new JEStorageModule()));

    GeoGIT gg = new GeoGIT(i, Tests.newTmpDir("geogit", "tmp"));

    Repository repo = gg.getOrCreateRepository();
    repo.command(ConfigOp.class)
        .setAction(ConfigAction.CONFIG_SET)
        .setName("user.name")
        .setValue("Wile E Coyote")
        .call();
    repo.command(ConfigOp.class)
        .setAction(ConfigAction.CONFIG_SET)
        .setName("user.email")
        .setValue("*****@*****.**")
        .call();

    addShp(TestData.states(), repo);
    addShp(TestData.point(), repo);
    addShp(TestData.line(), repo);
    addShp(TestData.polygon(), repo);

    repo.command(BranchCreateOp.class).setName("scratch").call();
    ws = new GeoGitWorkspace(gg, null);
  }
Ejemplo n.º 2
0
 protected File newTmpDir() throws IOException {
   return Tests.newTmpDir("geopkg", name.getMethodName());
 }