
org.robolectric.shadows.ShadowResultReceiver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of framework Show documentation
Show all versions of framework Show documentation
An alternative Android testing framework.
The newest version!
package org.robolectric.shadows;
import android.os.Bundle;
import android.os.ResultReceiver;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.RealObject;
import org.robolectric.util.ReflectionHelpers;
import org.robolectric.util.ReflectionHelpers.ClassParameter;
@Implements(ResultReceiver.class)
public class ShadowResultReceiver {
@RealObject private ResultReceiver realResultReceiver;
@Implementation
public void send(int resultCode, android.os.Bundle resultData) {
ReflectionHelpers.callInstanceMethod(realResultReceiver, "onReceiveResult",
ClassParameter.from(Integer.TYPE, resultCode),
ClassParameter.from(Bundle.class, resultData));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy