Adding unit test for when pushing to invalid path.

This commit is contained in:
Samuel Carlsson 2014-03-20 21:25:52 +01:00
parent 5f54c813cc
commit c28902385f

View File

@ -7,6 +7,7 @@ import org.junit.Test;
import se.vidstige.jadb.JadbDevice;
import se.vidstige.jadb.JadbConnection;
import se.vidstige.jadb.JadbException;
import se.vidstige.jadb.RemoteFile;
public class RealDeviceTestCases {
@ -46,6 +47,14 @@ public class RealDeviceTestCases {
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
public void testPullFile() throws Exception
{