mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-24 07:58:50 -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.Robolectric;
|
||||||
import org.robolectric.RobolectricTestRunner;
|
import org.robolectric.RobolectricTestRunner;
|
||||||
import org.robolectric.shadows.ShadowLog;
|
import org.robolectric.shadows.ShadowLog;
|
||||||
|
import org.sufficientlysecure.keychain.util.ParcelableFileCache.IteratorWithSize;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@ -59,9 +60,9 @@ public class ParcelableFileCacheTest {
|
|||||||
cache.writeCache(list.size(), list.iterator());
|
cache.writeCache(list.size(), list.iterator());
|
||||||
|
|
||||||
// read back
|
// 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()) {
|
while (it.hasNext()) {
|
||||||
Bundle b = it.next();
|
Bundle b = it.next();
|
||||||
|
Loading…
Reference in New Issue
Block a user