diff options
author | Sam Judd <judds@google.com> | 2014-11-04 18:26:21 -0800 |
---|---|---|
committer | Sam Judd <judds@google.com> | 2014-11-04 18:26:21 -0800 |
commit | 59e410d39587e16ca5bdadafa4c4b18043840568 (patch) | |
tree | 152f87f5c9de4194e4ae77f7715cca08b26c0ad5 | |
parent | 913e45915bd8aebd6e419d727020f6efc5d80ac6 (diff) | |
download | glide-59e410d39587e16ca5bdadafa4c4b18043840568.tar.gz |
Use resetter API in robolectric.
resetStaticState was removed here:
https://github.com/robolectric/robolectric/pull/1364
-rw-r--r-- | library/src/androidTest/java/com/bumptech/glide/GlideTest.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/library/src/androidTest/java/com/bumptech/glide/GlideTest.java b/library/src/androidTest/java/com/bumptech/glide/GlideTest.java index aae0abda..d3ad222d 100644 --- a/library/src/androidTest/java/com/bumptech/glide/GlideTest.java +++ b/library/src/androidTest/java/com/bumptech/glide/GlideTest.java @@ -51,6 +51,7 @@ import org.robolectric.RobolectricTestRunner; import org.robolectric.annotation.Config; import org.robolectric.annotation.Implementation; import org.robolectric.annotation.Implements; +import org.robolectric.annotation.Resetter; import org.robolectric.shadows.ShadowBitmap; import java.io.ByteArrayInputStream; @@ -807,7 +808,7 @@ public class GlideTest { // one content resolver shadow in one part of the test and a different one in a different part of the test. Each // one ends up with different registered uris, which causes tests to fail. We shouldn't need to do this, but // using static maps seems to fix the issue. - @Implements(value = ContentResolver.class, resetStaticState = true) + @Implements(value = ContentResolver.class) public static class ShadowFileDescriptorContentResolver { private static final Map<Uri, AssetFileDescriptor> URI_TO_FILE_DESCRIPTOR = new HashMap<Uri, AssetFileDescriptor>(); @@ -837,6 +838,7 @@ public class GlideTest { return URI_TO_FILE_DESCRIPTOR.get(uri); } + @Resetter public static void reset() { URI_TO_INPUT_STREAMS.clear(); URI_TO_FILE_DESCRIPTOR.clear(); |