Home | History | Annotate | Download | only in targetprep
      1 package com.android.tradefed.targetprep;
      2 
      3 import com.android.tradefed.device.DeviceNotAvailableException;
      4 import com.android.tradefed.device.TestDeviceState;
      5 import com.android.tradefed.testtype.DeviceTestCase;
      6 
      7 public class DeviceWiperFuncTest extends DeviceTestCase {
      8 
      9     public void testWipe() throws DeviceNotAvailableException, TargetSetupError {
     10         getDevice().enableAdbRoot();
     11         getDevice().executeShellCommand("rm /data/local/tmp/foo.txt");
     12         getDevice().pushString("blargh", "/data/local/tmp/foo.txt");
     13         assertTrue(getDevice().doesFileExist("/data/local/tmp/foo.txt"));
     14         new DeviceWiper().setUp(getDevice(), null);
     15         assertTrue(getDevice().getDeviceState().equals(TestDeviceState.ONLINE));
     16         assertFalse(getDevice().doesFileExist("/data/local/tmp/foo.txt"));
     17 
     18     }
     19 }
     20