Mercurial > hg > Members > tatsuki > JungleXMLReader
comparison src/test/java/jp/ac/u_ryukyu/cr/ie/tatsuki/functionTest/PersonIdsTest.java @ 7:47eb9ee2a1db
add PersonIdsTest and Method
add isActive Test and Method
author | one |
---|---|
date | Sat, 25 Oct 2014 07:48:02 +0900 |
parents | |
children | 378bfec11a8d |
comparison
equal
deleted
inserted
replaced
6:109d552e4bb6 | 7:47eb9ee2a1db |
---|---|
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 } |