7
|
1 package jp.ac.u_ryukyu.cr.ie.tatsuki.functionTest;
|
|
2
|
|
3 import java.util.Iterator;
|
|
4
|
|
5 import jp.ac.u_ryukyu.cr.ie.tatsuki.bbs.JuGrix;
|
|
6 import jp.ac.u_ryukyu.cr.ie.tatsuki.bbs.loadXml;
|
|
7 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.JungleTree;
|
|
8 import junit.framework.Assert;
|
|
9
|
|
10 import org.junit.Test;
|
|
11
|
|
12 public class PersonIdsTest {
|
|
13
|
|
14 @Test
|
|
15 public void PersonIdsTest() {
|
|
16 try {
|
|
17 loadXml reader = new loadXml();
|
|
18 JungleTree tree = reader.loadTestData("Person.xml");
|
|
19 JuGrix jugrix = new JuGrix();
|
|
20 Iterator<String> ids = jugrix.personIds(tree, "o:2");
|
|
21
|
|
22 ids.hasNext();
|
|
23 Assert.assertEquals(ids.next(),"p:45");
|
|
24 ids.hasNext();
|
|
25 Assert.assertEquals(ids.next(),"p:1");
|
|
26
|
|
27 } catch (Exception e) {
|
|
28 e.printStackTrace();
|
|
29 }
|
|
30 }
|
|
31 }
|