@SmallTest
@MediumTest
@LargeTest
public void testCollectionIterator() throws JSONException {
JSONArray array = new JSONArray();
array.put(5);
array.put(-1);
Collection<Integer> collection = GraphObject.Factory.createList(array, Integer.class);
Iterator<Integer> iter = collection.iterator();
assertTrue(iter.hasNext());
assertTrue(iter.next() == 5);
assertTrue(iter.hasNext());
assertTrue(iter.next() == -1);
assertFalse(iter.hasNext());
for (Integer i : collection) {
assertNotSame(0, i);
}
}
GraphObjectFactoryTests.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:LostAndFound
作者:
评论列表
文章目录