I'm trying to test a method with Robolectric (first contact with Robolectric).
I would like to set the system clock forward in order to fire an alarm, which was previously set with:
alarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, alarmDelay, pendingIntent);
I tried to use SystemClock.setCurrentTimeMillis(time + alarmDelay) but it doesn't fire anything.
Should I create a MockedSystemClock, but I don't know which method to use.
Please give me an idea.