@Test public void testWrite() throws Exception { try { fileManager_.write(TEST_FILE_COPY, Files.readAllBytes(TEST_FILE), true); assertTrue(Files.exists(TEST_FILE_COPY)); } finally { if (Files.exists(TEST_FILE_COPY)) { Files.delete(TEST_FILE_COPY); } } }
@Test public void testDelete() throws Exception { try { Files.copy(TEST_FILE, TEST_FILE_COPY); fileManager_.delete(TEST_FILE_COPY); assertTrue(!Files.exists(TEST_FILE_COPY)); } finally { if (Files.exists(TEST_FILE_COPY)) { Files.delete(TEST_FILE_COPY); } } }
@Test public void testResolve() { Path resolved = fileManager_.resolve(TEST_FILE_RELATIVE.toString()).toAbsolutePath(); assertEquals(TEST_FILE.toAbsolutePath(), resolved); }
@Test public void testEnsureRelative() { Path relative = fileManager_.ensureRelative(TEST_FILE); assertEquals(TEST_FILE_RELATIVE, relative); }
@Test public void testExists() { assertTrue(fileManager_.exists(TEST_FILE)); }