Mercurial > hg > Members > tatsuki > JungleXMLReader
view src/test/java/jp/ac/u_ryukyu/cr/ie/tatsuki/functionTest/PersonIdsTest.java @ 43:1bdd50e26fac
Merge with 037731e99d6e876ecc1ef2d921d2ce5f71974376
author | one |
---|---|
date | Tue, 25 Nov 2014 12:12:17 +0900 |
parents | c036d36c33af 037731e99d6e |
children | 5e8eac03fed3 |
line wrap: on
line source
package jp.ac.u_ryukyu.cr.ie.tatsuki.functionTest; import java.util.Iterator; import java.util.LinkedList; import jp.ac.u_ryukyu.cr.ie.tatsuki.bbs.JuGrix; import junit.framework.Assert; import org.junit.Test; public class PersonIdsTest { @Test public void testPersonIds() { JuGrix jugrix = new JuGrix(); LinkedList<String> filterIds = new LinkedList<String>(); Iterator<String> ids = jugrix.personIds("o:2", filterIds); Assert.assertTrue(ids.hasNext()); Assert.assertEquals(ids.next(), "p:1"); Assert.assertTrue(ids.hasNext()); Assert.assertEquals(ids.next(), "p:45"); filterIds.add("r:9"); ids = jugrix.personIds("o:2", filterIds); Assert.assertTrue(ids.hasNext()); Assert.assertEquals(ids.next(), "p:45"); Assert.assertTrue(ids.hasNext()); Assert.assertEquals(ids.next(), "p:1"); filterIds.add("rde:3"); ids = jugrix.personIds("o:2", filterIds); ids.hasNext(); Assert.assertEquals(ids.next(), "p:45"); ids.hasNext(); Assert.assertEquals(ids.next(), "p:1"); filterIds.add("rde:322"); ids = jugrix.personIds("o:2", filterIds); Assert.assertFalse(ids.hasNext()); } }