19
|
1 package jp.ac.u_ryukyu.cr.ie.tatsuki.functionTest;
|
|
2
|
|
3 import java.util.Iterator;
|
|
4 import java.util.LinkedList;
|
|
5
|
|
6 import jp.ac.u_ryukyu.cr.ie.tatsuki.bbs.JuGrix;
|
|
7
|
|
8 import org.junit.Assert;
|
|
9 import org.junit.Test;
|
|
10
|
32
|
11 public class DeepChildOrganizationIdsPlusTest {
|
19
|
12
|
38
|
13 @Test
|
42
|
14 public void TestDeepChildOrganizationIdsPlus() {
|
|
15
|
|
16 JuGrix jugrix = new JuGrix();
|
|
17 LinkedList<String> filterIds = new LinkedList<String>();
|
|
18 Iterator<String> childrenIds = jugrix.deepChildOrganizationIdsPlus("o:2", filterIds);
|
|
19 Assert.assertTrue(childrenIds.hasNext());
|
|
20 String orgId = childrenIds.next();
|
|
21 Assert.assertEquals(orgId, "o:2");
|
|
22 Assert.assertTrue(childrenIds.hasNext());
|
|
23 orgId = childrenIds.next();
|
|
24 Assert.assertEquals(orgId, "o:3");
|
|
25
|
|
26 filterIds.add("r:9");
|
|
27 childrenIds = jugrix.deepChildOrganizationIdsPlus("o:2", filterIds);
|
|
28 Assert.assertTrue(childrenIds.hasNext());
|
|
29 orgId = childrenIds.next();
|
|
30 Assert.assertEquals(orgId, "o:2");
|
|
31
|
|
32 filterIds.add("rde:3");
|
|
33 childrenIds = jugrix.deepChildOrganizationIdsPlus("o:2", filterIds);
|
|
34 Assert.assertTrue(childrenIds.hasNext());
|
|
35 orgId = childrenIds.next();
|
|
36 Assert.assertEquals(orgId, "o:2");
|
|
37
|
|
38
|
38
|
39 }
|
19
|
40 }
|