From be4fa2279c0342fd4958fe2479925167e5e43ccc Mon Sep 17 00:00:00 2001 From: Samuel Carlsson Date: Mon, 25 Jul 2016 18:51:24 +0200 Subject: [PATCH] Refactor: Putting test output in `out/` directory. To avoid cluttering the repo root. --- .gitignore | 6 ------ test/se/vidstige/jadb/test/RealDeviceTestCases.java | 8 ++++---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 6aa6197..e37b44d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,3 @@ -Generated by tests -/foobar.md -/xyz -screenshot.png - - ################ # IntelliJ # ################ diff --git a/test/se/vidstige/jadb/test/RealDeviceTestCases.java b/test/se/vidstige/jadb/test/RealDeviceTestCases.java index 64687a7..afd3b36 100644 --- a/test/se/vidstige/jadb/test/RealDeviceTestCases.java +++ b/test/se/vidstige/jadb/test/RealDeviceTestCases.java @@ -76,15 +76,15 @@ public class RealDeviceTestCases { @Test public void testPullFile() throws Exception { JadbDevice any = jadb.getAnyDevice(); - any.pull(new RemoteFile("/sdcard/README.md"), new File("foobar.md")); + any.pull(new RemoteFile("/sdcard/README.md"), new File("out/foobar.md")); //second read on the same device - any.pull(new RemoteFile("/sdcard/README.md"), new File("foobar.md")); + any.pull(new RemoteFile("/sdcard/README.md"), new File("out/foobar.md")); } @Test(expected = JadbException.class) public void testPullInvalidFile() throws Exception { JadbDevice any = jadb.getAnyDevice(); - any.pull(new RemoteFile("/file/does/not/exist"), new File("xyz")); + any.pull(new RemoteFile("/file/does/not/exist"), new File("out/xyz")); } @Test @@ -99,7 +99,7 @@ public class RealDeviceTestCases { JadbDevice any = jadb.getAnyDevice(); FileOutputStream outputStream = null; try { - outputStream = new FileOutputStream(new File("screenshot.png")); + outputStream = new FileOutputStream(new File("out/screenshot.png")); InputStream stdout = any.executeShell("screencap", "-p"); Stream.copy(stdout, outputStream); } finally {