org.robolectric.shadows.ShadowProcess Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shadows-core-v19 Show documentation
Show all versions of shadows-core-v19 Show documentation
An alternative Android testing framework.
package org.robolectric.shadows;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.Resetter;
/**
* Shadow for {@link android.os.Process}.
*/
@Implements(android.os.Process.class)
public class ShadowProcess {
private static int pid;
@Implementation
public static final int myPid() {
return pid;
}
public static void setPid(int pid) {
ShadowProcess.pid = pid;
}
@Resetter
public static void reset() {
ShadowProcess.pid = 0;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy