annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
1 package jp.ac.u_ryukyu.cr.ie.tatsuki.functionTest;
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
2
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
3 import java.util.Iterator;
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
4
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
5 import jp.ac.u_ryukyu.cr.ie.tatsuki.bbs.JuGrix;
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
6 import jp.ac.u_ryukyu.cr.ie.tatsuki.bbs.loadXml;
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
7 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.JungleTree;
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
8 import junit.framework.Assert;
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
9
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
10 import org.junit.Test;
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
11
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
12 public class PersonIdsTest {
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
13
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
14 @Test
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
15 public void PersonIdsTest() {
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
16 try {
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
17 loadXml reader = new loadXml();
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
18 JungleTree tree = reader.loadTestData("Person.xml");
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
19 JuGrix jugrix = new JuGrix();
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
20 Iterator<String> ids = jugrix.personIds(tree, "o:2");
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
21
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
22 ids.hasNext();
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
23 Assert.assertEquals(ids.next(),"p:45");
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
24 ids.hasNext();
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
25 Assert.assertEquals(ids.next(),"p:1");
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
26
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
27 } catch (Exception e) {
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
28 e.printStackTrace();
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
29 }
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
30 }
47eb9ee2a1db add PersonIdsTest and Method
one
parents:
diff changeset
31 }