Mercurial > hg > Members > tatsuki > JungleXMLReader
view src/test/java/jp/ac/u_ryukyu/cr/ie/tatsuki/functionTest/ParentOrganizationIdsTest.java @ 42:c036d36c33af
function refactor
author | one |
---|---|
date | Tue, 25 Nov 2014 11:57:17 +0900 |
parents | b8d86bc46b51 |
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 ParentOrganizationIdsTest { @Test public void testParentOrganizationIds() { JuGrix jugrix = new JuGrix(); 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()); filterIds = new LinkedList<String>(); filterIds.add("rde:2"); childrenIds = jugrix.parentOrganizationIds("o:2", filterIds); Assert.assertTrue(childrenIds.hasNext()); Assert.assertEquals(childrenIds.next(), "o:23"); } }