Examples of pwd()


Examples of org.locationtech.geogig.api.Platform.pwd()

        final File userhome = tempFolder.newFolder("mockUserHomeDir");
        final File workingDir = tempFolder.newFolder("mockWorkingDir");
        tempFolder.newFolder("mockWorkingDir/.geogig");

        final Platform platform = mock(Platform.class);
        when(platform.pwd()).thenReturn(workingDir);
        when(platform.getUserHome()).thenReturn(userhome);

        cli.setPlatform(platform);
    }
}
View Full Code Here

Examples of org.locationtech.geogig.api.Platform.pwd()

        File workingDir = tmpFolder.newFolder("fakeWorkingDir");
        File fakeRepo = new File(workingDir, ".geogig");
        fakeRepo.mkdirs();

        Platform platform = mock(Platform.class);
        when(platform.pwd()).thenReturn(workingDir);

        URL resolvedRepoDir = new ResolveGeogigDir(platform).call().get();
        assertEquals(fakeRepo.toURI().toURL(), resolvedRepoDir);

        workingDir = new File(new File(workingDir, "subdir1"), "subdir2");
View Full Code Here

Examples of org.locationtech.geogig.api.Platform.pwd()

        URL resolvedRepoDir = new ResolveGeogigDir(platform).call().get();
        assertEquals(fakeRepo.toURI().toURL(), resolvedRepoDir);

        workingDir = new File(new File(workingDir, "subdir1"), "subdir2");
        workingDir.mkdirs();
        when(platform.pwd()).thenReturn(workingDir);

        resolvedRepoDir = new ResolveGeogigDir(platform).call().get();
        assertEquals(fakeRepo.toURI().toURL(), resolvedRepoDir);

        when(platform.pwd()).thenReturn(tmpFolder.getRoot());
View Full Code Here

Examples of org.locationtech.geogig.api.Platform.pwd()

        when(platform.pwd()).thenReturn(workingDir);

        resolvedRepoDir = new ResolveGeogigDir(platform).call().get();
        assertEquals(fakeRepo.toURI().toURL(), resolvedRepoDir);

        when(platform.pwd()).thenReturn(tmpFolder.getRoot());
        assertFalse(new ResolveGeogigDir(platform).call().isPresent());

    }

}
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.