private ZipEntry getZipEntry(final Path subPath) { return new ZipEntry(FileNameResolver.resolve(subPath.toUri().getPath(), originalPath.toUri().getPath())); }
private ZipEntry getZipEntry(final Path subPath) { return new ZipEntry(FileNameResolver.resolve(subPath.toUri().getPath(), originalPath.toUri().getPath())); }
@Test public void testRoot() throws Exception { assertEquals("file.txt", Archiver.FileNameResolver.resolve("/file.txt", "/")); }
@Test public void testFewFolders() throws Exception { assertEquals("hello/file.txt", Archiver.FileNameResolver.resolve("project/hello/file.txt", "project/hello")); }
@Test public void testFewFolders() throws Exception { assertEquals("hello/file.txt", Archiver.FileNameResolver.resolve("project/hello/file.txt", "project/hello")); }
@Test public void testNormal() throws Exception { assertEquals("hello/file.txt", Archiver.FileNameResolver.resolve("hello/file.txt", "hello")); }
@Test public void testRoot() throws Exception { assertEquals("file.txt", Archiver.FileNameResolver.resolve("/file.txt", "/")); }
@Test public void testRoot() throws Exception { assertEquals("file.txt", Archiver.FileNameResolver.resolve("/file.txt", "/")); } }
@Test public void testRootFolder() throws Exception { assertEquals("/file.txt", Archiver.FileNameResolver.resolve("/project/file.txt", "/project/")); } }
@Test public void testNormal() throws Exception { assertEquals("hello/file.txt", Archiver.FileNameResolver.resolve("hello/file.txt", "hello")); }
@Test public void testRootFolder() throws Exception { assertEquals("/file.txt", Archiver.FileNameResolver.resolve("/project/file.txt", "/project/")); } }
@Test public void testNormal() throws Exception { assertEquals("hello/file.txt", Archiver.FileNameResolver.resolve("hello/file.txt", "hello")); }
@Test public void testFewFolders() throws Exception { assertEquals("hello/file.txt", Archiver.FileNameResolver.resolve("project/hello/file.txt", "project/hello")); }