Search in sources :

Example 1 with ShadowSensorManager

use of org.robolectric.shadows.ShadowSensorManager in project sensey by nisrulz.

the class SenseyTest method setUp.

@Before
public void setUp() {
    Context context = RuntimeEnvironment.application.getApplicationContext();
    shadowSensorManager = Shadows.shadowOf((SensorManager) context.getSystemService(SENSOR_SERVICE));
    sensey = Sensey.getInstance();
    sensey.init(context);
}
Also used : Context(android.content.Context) SensorManager(android.hardware.SensorManager) ShadowSensorManager(org.robolectric.shadows.ShadowSensorManager) Before(org.junit.Before)

Aggregations

Context (android.content.Context)1 SensorManager (android.hardware.SensorManager)1 Before (org.junit.Before)1 ShadowSensorManager (org.robolectric.shadows.ShadowSensorManager)1