Mercurial > hg > Members > tatsuki > JungleXMLReader
comparison src/test/java/jp/ac/u_ryukyu/cr/ie/tatsuki/functionTest/childOrganizationIds.java @ 28:ed831b2fc156
temporarily stored
author | one |
---|---|
date | Fri, 07 Nov 2014 02:20:07 +0900 |
parents | da872647cbe4 |
children | 7f70341a78bc |
comparison
equal
deleted
inserted
replaced
27:095813055f19 | 28:ed831b2fc156 |
---|---|
1 package jp.ac.u_ryukyu.cr.ie.tatsuki.functionTest; | 1 package jp.ac.u_ryukyu.cr.ie.tatsuki.functionTest; |
2 | 2 |
3 import java.util.Iterator; | 3 import java.util.Iterator; |
4 import java.util.LinkedList; | |
4 | 5 |
5 import org.junit.Assert; | 6 import org.junit.Assert; |
6 import org.junit.Test; | 7 import org.junit.Test; |
7 | 8 |
8 import jp.ac.u_ryukyu.cr.ie.tatsuki.bbs.JuGrix; | 9 import jp.ac.u_ryukyu.cr.ie.tatsuki.bbs.JuGrix; |
9 | 10 |
10 public class childOrganizationIds { | 11 public class childOrganizationIds { |
11 | 12 |
12 @Test | 13 @Test |
13 public void childOrganizationIdsTest(){ | 14 public void childOrganizationIdsTest(){ |
14 JuGrix jugrix = new JuGrix(); | 15 JuGrix jugrix = new JuGrix(false); |
15 Iterator<String> ids = jugrix.childOrganizationIds("o:2", null); | 16 LinkedList<String> list = new LinkedList<String>(); |
17 Iterator<String> ids = jugrix.childOrganizationIds("o:2", list); | |
16 | 18 |
17 Assert.assertTrue(ids.hasNext()); | 19 Assert.assertTrue(ids.hasNext()); |
18 Assert.assertEquals(ids.next(),"o:3"); | 20 Assert.assertEquals(ids.next(),"o:3"); |
19 Assert.assertEquals(ids.next(),"o:99"); | 21 Assert.assertEquals(ids.next(),"o:9"); |
22 | |
23 JuGrix indexJugrix = new JuGrix(true); | |
24 ids = indexJugrix.childOrganizationIds("o:2", list); | |
25 | |
26 Assert.assertTrue(ids.hasNext()); | |
27 Assert.assertEquals(ids.next(),"o:3"); | |
28 Assert.assertEquals(ids.next(),"o:9"); | |
20 } | 29 } |
21 } | 30 } |