Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to change date/time of emulator #72

Open
agramian opened this issue Oct 25, 2017 · 1 comment
Open

Ability to change date/time of emulator #72

agramian opened this issue Oct 25, 2017 · 1 comment

Comments

@agramian
Copy link

It would be useful to provide a way to change the emulator's date and time for certain tests that vary the UI or logic based on the current device time.

@Kisty
Copy link
Contributor

Kisty commented Apr 11, 2018

This would be helpful. Especially when testing alarms in AlarmManager.

One option is to use ShadowAlarmManager#getScheduledAlarms() in Robolectric, to check for scheduled alarms.

This answer might help in adding it to Test Butler.

In the meantime, you could add a custom layer of indirection or use joda-time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants