Mercurial > hg > Members > tatsuki > JungleXMLReader
view src/test/java/jp/ac/u_ryukyu/cr/ie/tatsuki/functionTest/ParentOrganizationIdsTest.java @ 32:b8d86bc46b51
remove warning and rename src file
author | one |
---|---|
date | Sun, 09 Nov 2014 17:56:49 +0900 |
parents | src/test/java/jp/ac/u_ryukyu/cr/ie/tatsuki/functionTest/parentOrganizationIdsTest.java@7f70341a78bc |
children | c036d36c33af |
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 ParentOrganizationIdsTest { @Test public void testParentOrganizationIds() { JuGrix jugrix = new JuGrix(false); LinkedList<String> filterIds = new LinkedList<String>(); filterIds.add("r:2"); Iterator<String> childrenIds = jugrix.parentOrganizationIds("o:2", filterIds); Assert.assertTrue(childrenIds.hasNext()); Assert.assertEquals(childrenIds.next(), "o:23"); filterIds.add("r:2a"); childrenIds = jugrix.parentOrganizationIds("o:2", filterIds); Assert.assertFalse(childrenIds.hasNext()); jugrix = new JuGrix(true); filterIds = new LinkedList<String>(); filterIds.add("r:2"); childrenIds = jugrix.parentOrganizationIds("o:2", filterIds); Assert.assertTrue(childrenIds.hasNext()); Assert.assertEquals(childrenIds.next(), "o:23"); filterIds.add("r:2a"); childrenIds = jugrix.parentOrganizationIds("o:2", filterIds); Assert.assertFalse(childrenIds.hasNext()); } }