use of com.android.ddmlib.testrunner.InstrumentationResultParser in project buck by facebook.
the class InstrumentationTestRunnerTest method testSetTrimLinesHappyPath.
/**
* Just verifies the reflection is legit
*/
@Test
public void testSetTrimLinesHappyPath() throws Throwable {
IShellEnabledDevice shellEnabledDevice = EasyMock.createMock(IShellEnabledDevice.class);
EasyMock.replay(shellEnabledDevice);
RemoteAndroidTestRunner runner = new RemoteAndroidTestRunner("foobar", "blah", shellEnabledDevice);
Field field = RemoteAndroidTestRunner.class.getDeclaredField("mParser");
field.setAccessible(true);
field.set(runner, new InstrumentationResultParser("fooBar", new ArrayList<ITestRunListener>()));
InstrumentationTestRunner.setTrimLine(runner, true);
}
Aggregations