Mercurial > hg > Members > tatsuki > JungleXMLReader
view src/test/java/jp/ac/u_ryukyu/cr/ie/tatsuki/functionTest/deepParentOrganizationIdsTest.java @ 31:7f70341a78bc
all function use index
author | one |
---|---|
date | Sat, 08 Nov 2014 06:31:14 +0900 |
parents | ef3fae2e7f0c |
children |
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 deepParentOrganizationIdsTest { @Test public void deepParentOrganizationIds(){ JuGrix jugrix = new JuGrix(false); LinkedList<String> filterIds = new LinkedList<String>(); Iterator<String> childrenIds = jugrix.deepParentOrganizationIds("o:2", filterIds); Assert.assertEquals(childrenIds.next(),"o:23"); Assert.assertEquals(childrenIds.next(),"o:22"); filterIds.add("r:2"); childrenIds = jugrix.deepParentOrganizationIds("o:2", filterIds); Assert.assertEquals(childrenIds.next(),"o:23"); jugrix = new JuGrix(true); filterIds = new LinkedList<String>(); childrenIds = jugrix.deepParentOrganizationIds("o:2", filterIds); Assert.assertEquals(childrenIds.next(),"o:23"); Assert.assertEquals(childrenIds.next(),"o:22"); filterIds.add("r:2"); childrenIds = jugrix.deepParentOrganizationIds("o:2", filterIds); Assert.assertEquals(childrenIds.next(),"o:23"); } }