Package org.robolectric.shadows
Class ShadowSystemProperties
- java.lang.Object
-
- org.robolectric.shadows.ShadowSystemProperties
-
@Implements(value=android.os.SystemProperties.class, isInAndroidSdk=false) public class ShadowSystemProperties extends Object
-
-
Constructor Summary
Constructors Constructor Description ShadowSystemProperties()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static String
native_get(String key)
protected static String
native_get(String key, String def)
protected static boolean
native_get_boolean(String key, boolean def)
protected static int
native_get_int(String key, int def)
protected static long
native_get_long(String key, long def)
protected static void
native_set(String key, String val)
static void
override(String key, String val)
Overrides the system property for testing.static void
reset()
-
-
-
Method Detail
-
native_get
@Implementation protected static String native_get(String key)
-
native_get
@Implementation protected static String native_get(String key, String def)
-
native_get_int
@Implementation protected static int native_get_int(String key, int def)
-
native_get_long
@Implementation protected static long native_get_long(String key, long def)
-
native_get_boolean
@Implementation protected static boolean native_get_boolean(String key, boolean def)
-
native_set
@Implementation protected static void native_set(String key, String val)
-
override
public static void override(String key, String val)
Overrides the system property for testing. Similar to the Android implementation, the value may be coerced to other types like boolean or long depending on the get method that is used.Note: Use
ShadowBuild
instead for changing fields inBuild
.
-
reset
@Resetter public static void reset()
-
-