Robolectric 3.1.3
·
9659 commits
to master
since this release
Android Simulation Changes:
- Robolectric's handling of styles and themes is now much more faithful to Android's actual behavior. Missing styles (often from AppCompat) are now more likely to cause failures, so you'll generally want to set a theme, either through your manifest or programmatically.
- Missing resources and attributes which silently failed or defaulted to platform attributes with the same name will now raise errors.
- Robolectric's
PackageManageris more fully implemented; e.g. you can nowsetPackagesForUid().
API Changes:
ContentProviders should be created usingRobolectric.buildContentProvider(), which simulates how the framework creates them (and callsonCreate()automatically).RoboMenuItems should be constructed with a context.RobolectricTestRunnerhas been changed to make it easier to customize manifest loading, while retaining caching. If you have a custom test runner, you should overridegetManifestFactory()instead ofgetAppManifest().- You can enable style resolution debug output by turning on logging (by setting the
robolectric.logging.enabledsystem property to"true").
Known Issues:
- Some issues resolving styles (particularly related to AppCompat) still exist.