mirror of
https://github.com/revanced/jadb.git
synced 2024-11-19 10:39:23 +01:00
Adding unit test for when pushing to invalid path.
This commit is contained in:
parent
5f54c813cc
commit
c28902385f
@ -7,6 +7,7 @@ import org.junit.Test;
|
|||||||
|
|
||||||
import se.vidstige.jadb.JadbDevice;
|
import se.vidstige.jadb.JadbDevice;
|
||||||
import se.vidstige.jadb.JadbConnection;
|
import se.vidstige.jadb.JadbConnection;
|
||||||
|
import se.vidstige.jadb.JadbException;
|
||||||
import se.vidstige.jadb.RemoteFile;
|
import se.vidstige.jadb.RemoteFile;
|
||||||
|
|
||||||
public class RealDeviceTestCases {
|
public class RealDeviceTestCases {
|
||||||
@ -46,6 +47,14 @@ public class RealDeviceTestCases {
|
|||||||
any.push(new File("README.md"), new RemoteFile("/sdcard/README.md"));
|
any.push(new File("README.md"), new RemoteFile("/sdcard/README.md"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test(expected = JadbException.class)
|
||||||
|
public void testPushFileToInvalidPath() throws Exception
|
||||||
|
{
|
||||||
|
JadbConnection jadb = new JadbConnection();
|
||||||
|
JadbDevice any = jadb.getAnyDevice();
|
||||||
|
any.push(new File("README.md"), new RemoteFile("/no/such/directory/README.md"));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPullFile() throws Exception
|
public void testPullFile() throws Exception
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user