mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-23 23:48:51 -05:00
fix unit test for ParcelableFileCache
This commit is contained in:
parent
f456c8a17d
commit
5d6c2d90c2
@ -27,6 +27,7 @@ import org.junit.runner.RunWith;
|
||||
import org.robolectric.Robolectric;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.shadows.ShadowLog;
|
||||
import org.sufficientlysecure.keychain.util.ParcelableFileCache.IteratorWithSize;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
@ -59,9 +60,9 @@ public class ParcelableFileCacheTest {
|
||||
cache.writeCache(list.size(), list.iterator());
|
||||
|
||||
// read back
|
||||
Iterator<Bundle> it = cache.readCache();
|
||||
IteratorWithSize<Bundle> it = cache.readCache();
|
||||
|
||||
Assert.assertEquals("number of entries must be correct", list.size(), cache.getNumEntries());
|
||||
Assert.assertEquals("number of entries must be correct", list.size(), it.getSize());
|
||||
|
||||
while (it.hasNext()) {
|
||||
Bundle b = it.next();
|
||||
|
Loading…
Reference in New Issue
Block a user