Mercurial > hg > Members > tatsuki > JungleXMLReader
comparison src/test/java/jp/ac/u_ryukyu/cr/ie/tatsuki/functionTest/parentOrganizationIdsTest.java @ 31:7f70341a78bc
all function use index
author | one |
---|---|
date | Sat, 08 Nov 2014 06:31:14 +0900 |
parents | ae739e8d86a2 |
children |
comparison
equal
deleted
inserted
replaced
30:f45b1c839753 | 31:7f70341a78bc |
---|---|
9 import org.junit.Test; | 9 import org.junit.Test; |
10 | 10 |
11 public class parentOrganizationIdsTest { | 11 public class parentOrganizationIdsTest { |
12 @Test | 12 @Test |
13 public void parentOrganizationIdsTest() { | 13 public void parentOrganizationIdsTest() { |
14 JuGrix jugrix = new JuGrix(); | 14 JuGrix jugrix = new JuGrix(false); |
15 LinkedList<String> filterIds = new LinkedList<String>(); | 15 LinkedList<String> filterIds = new LinkedList<String>(); |
16 filterIds.add("r:2"); | 16 filterIds.add("r:2"); |
17 Iterator<String> childrenIds = jugrix.parentOrganizationIds("o:2", filterIds); | 17 Iterator<String> childrenIds = jugrix.parentOrganizationIds("o:2", filterIds); |
18 Assert.assertTrue(childrenIds.hasNext()); | 18 Assert.assertTrue(childrenIds.hasNext()); |
19 Assert.assertEquals(childrenIds.next(), "o:23"); | 19 Assert.assertEquals(childrenIds.next(), "o:23"); |
20 | 20 |
21 filterIds.add("r:2w"); | 21 filterIds.add("r:2a"); |
22 childrenIds = jugrix.parentOrganizationIds("o:2", filterIds); | 22 childrenIds = jugrix.parentOrganizationIds("o:2", filterIds); |
23 Assert.assertFalse(childrenIds.hasNext()); | 23 Assert.assertFalse(childrenIds.hasNext()); |
24 | |
25 jugrix = new JuGrix(true); | |
26 filterIds = new LinkedList<String>(); | |
27 filterIds.add("r:2"); | |
28 childrenIds = jugrix.parentOrganizationIds("o:2", filterIds); | |
29 Assert.assertTrue(childrenIds.hasNext()); | |
30 Assert.assertEquals(childrenIds.next(), "o:23"); | |
31 | |
32 filterIds.add("r:2a"); | |
33 childrenIds = jugrix.parentOrganizationIds("o:2", filterIds); | |
34 Assert.assertFalse(childrenIds.hasNext()); | |
24 } | 35 } |
25 } | 36 } |