()
| 186 | } |
| 187 | |
| 188 | @Test |
| 189 | public void testCopy() throws Exception { |
| 190 | assertMemoryLeak(() -> { |
| 191 | File temp = temporaryFolder.newFile(); |
| 192 | TestUtils.writeStringToFile(temp, "abcde"); |
| 193 | try (Path path = new Path().of(temp.getAbsolutePath())) { |
| 194 | Assert.assertTrue(Files.exists(path.$())); |
| 195 | try (Path copyPath = new Path().of(temp.getAbsolutePath()).put("-copy")) { |
| 196 | Files.copy(path.$(), copyPath.$()); |
| 197 | |
| 198 | Assert.assertEquals(5, Files.length(copyPath.$())); |
| 199 | TestUtils.assertFileContentsEquals(path, copyPath); |
| 200 | } |
| 201 | } |
| 202 | }); |
| 203 | } |
| 204 | |
| 205 | @Test |
| 206 | public void testCopyBigFile() throws Exception { |
nothing calls this directly
no test coverage detected