Home | History | Annotate | Download | only in targetprep

Lines Matching defs:EasyMock

34 import org.easymock.EasyMock;
59 mMockRunUtil = EasyMock.createMock(IRunUtil.class);
60 mMockDeviceManager = EasyMock.createMock(IDeviceManager.class);
68 mMockBuildInfo = EasyMock.createMock(ISdkBuildInfo.class);
69 mMockDevice = EasyMock.createMock(ITestDevice.class);
70 mMockIDevice = EasyMock.createMock(IDevice.class);
72 mMockRunUtil.setEnvVariable(EasyMock.eq("ANDROID_SWT"), (String)EasyMock.anyObject());
73 EasyMock.expect(mMockBuildInfo.getAndroidToolPath()).andStubReturn(ANDROID_TOOL);
74 EasyMock.expect(mMockBuildInfo.getEmulatorToolPath()).andStubReturn(EMULATOR_TOOL);
75 EasyMock.expect(mMockBuildInfo.getSdkDir()).andStubReturn(new File("sdk"));
76 EasyMock.expect(mMockDevice.getIDevice()).andStubReturn(mMockIDevice);
77 EasyMock.expect(mMockDevice.getSerialNumber()).andStubReturn("serial");
78 EasyMock.expect(mMockDevice.getDeviceDescriptor()).andStubReturn(null);
110 mMockRunUtil.setEnvVariable(EasyMock.eq("ANDROID_SDK_HOME"), (String)EasyMock.anyObject());
111 mMockRunUtil.setEnvVariable(EasyMock.eq("ANDROID_SDK_ROOT"), (String)EasyMock.anyObject());
114 EasyMock.expect(mMockDevice.getDeviceState()).andReturn(TestDeviceState.NOT_AVAILABLE);
115 EasyMock.expect(mMockDevice.getSerialNumber()).andReturn("emulator-5554").anyTimes();
116 EasyMock.expect(mMockIDevice.isEmulator()).andReturn(true);
117 mMockDeviceManager.launchEmulator(EasyMock.eq(mMockDevice), EasyMock.anyLong(),
118 EasyMock.eq(mMockRunUtil), (List<String>)EasyMock.anyObject());
120 EasyMock.expect(mMockDevice.executeShellCommand((String) EasyMock.anyObject()))
122 mMockRunUtil.sleep(EasyMock.anyLong());
123 EasyMock.expectLastCall().times(3);
125 EasyMock.expect(mMockIDevice.getAvdName()).andReturn("target");
137 mMockRunUtil.setEnvVariable(EasyMock.eq("ANDROID_SDK_HOME"), (String)EasyMock.anyObject());
138 mMockRunUtil.setEnvVariable(EasyMock.eq("ANDROID_SDK_ROOT"), (String)EasyMock.anyObject());
141 EasyMock.expect(mMockDevice.getDeviceState()).andReturn(TestDeviceState.NOT_AVAILABLE);
142 EasyMock.expect(mMockDevice.getSerialNumber()).andReturn("emulator-5554").anyTimes();
143 EasyMock.expect(mMockIDevice.isEmulator()).andReturn(true);
144 mMockDeviceManager.launchEmulator(EasyMock.eq(mMockDevice), EasyMock.anyLong(),
145 EasyMock.eq(mMockRunUtil), (List<String>)EasyMock.anyObject());
148 EasyMock.expect(mMockDevice.executeShellCommand((String) EasyMock.anyObject()))
150 mMockRunUtil.sleep(EasyMock.anyLong());
151 EasyMock.expectLastCall().times(3);
153 EasyMock.expect(mMockIDevice.getAvdName()).andReturn("").times(2);
154 EasyMock.expect(mMockDevice.getDeviceDescriptor()).andReturn(new DeviceDescriptor("SERIAL",
172 mMockRunUtil.setEnvVariable(EasyMock.eq("ANDROID_SDK_HOME"), (String)EasyMock.anyObject());
173 mMockRunUtil.setEnvVariable(EasyMock.eq("ANDROID_SDK_ROOT"), (String)EasyMock.anyObject());
176 EasyMock.expect(mMockDevice.getDeviceState()).andReturn(TestDeviceState.NOT_AVAILABLE);
177 EasyMock.expect(mMockDevice.getSerialNumber()).andReturn("emulator-5554").anyTimes();
178 EasyMock.expect(mMockIDevice.isEmulator()).andReturn(true);
179 mMockDeviceManager.launchEmulator(EasyMock.eq(mMockDevice), EasyMock.anyLong(),
180 EasyMock.eq(mMockRunUtil), (List<String>)EasyMock.anyObject());
181 EasyMock.expectLastCall().andThrow(new DeviceNotAvailableException());
182 mMockDeviceManager.killEmulator(EasyMock.eq(mMockDevice));
183 EasyMock.expect(mMockDevice.getDeviceDescriptor()).andReturn(new DeviceDescriptor("SERIAL",
202 mMockRunUtil.setEnvVariable(EasyMock.eq("ANDROID_SDK_HOME"), (String)EasyMock.anyObject());
209 EasyMock.expect(mMockDevice.getDeviceDescriptor()).andReturn(new DeviceDescriptor("SERIAL",
229 EasyMock.expect(mMockRunUtil.runTimedCmd(EasyMock.anyLong(), EasyMock.eq(ANDROID_TOOL),
230 (String)EasyMock.anyObject(), (String)EasyMock.anyObject(),
231 (String)EasyMock.anyObject())).andReturn(result);
250 EasyMock.expect(mMockRunUtil.runTimedCmdWithInput(EasyMock.anyLong(),
251 (String)EasyMock.anyObject(), (List<String>)EasyMock.anyObject())).andReturn(result);
255 EasyMock.replay(mMockRunUtil, mMockDeviceManager, mMockBuildInfo, mMockDevice,
260 EasyMock.verify(mMockRunUtil, mMockDeviceManager, mMockBuildInfo, mMockDevice,