annotate src/test/java/jp/ac/u_ryukyu/cr/ie/tatsuki/functionTest/ChildOrganizationIdsTest.java @ 34:96dcbd8e2fcb

refactoring
author one
date Sun, 09 Nov 2014 22:56:53 +0900
parents b8d86bc46b51
children 037731e99d6e c036d36c33af
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
4cfa77c61ee1 add childOrganizationIdsTest and Method
one
parents:
diff changeset
1 package jp.ac.u_ryukyu.cr.ie.tatsuki.functionTest;
4cfa77c61ee1 add childOrganizationIdsTest and Method
one
parents:
diff changeset
2
4cfa77c61ee1 add childOrganizationIdsTest and Method
one
parents:
diff changeset
3 import java.util.Iterator;
28
ed831b2fc156 temporarily stored
one
parents: 19
diff changeset
4 import java.util.LinkedList;
16
4cfa77c61ee1 add childOrganizationIdsTest and Method
one
parents:
diff changeset
5
4cfa77c61ee1 add childOrganizationIdsTest and Method
one
parents:
diff changeset
6 import org.junit.Assert;
4cfa77c61ee1 add childOrganizationIdsTest and Method
one
parents:
diff changeset
7 import org.junit.Test;
4cfa77c61ee1 add childOrganizationIdsTest and Method
one
parents:
diff changeset
8
4cfa77c61ee1 add childOrganizationIdsTest and Method
one
parents:
diff changeset
9 import jp.ac.u_ryukyu.cr.ie.tatsuki.bbs.JuGrix;
4cfa77c61ee1 add childOrganizationIdsTest and Method
one
parents:
diff changeset
10
32
b8d86bc46b51 remove warning and rename src file
one
parents: 31
diff changeset
11 public class ChildOrganizationIdsTest {
16
4cfa77c61ee1 add childOrganizationIdsTest and Method
one
parents:
diff changeset
12
4cfa77c61ee1 add childOrganizationIdsTest and Method
one
parents:
diff changeset
13 @Test
4cfa77c61ee1 add childOrganizationIdsTest and Method
one
parents:
diff changeset
14 public void childOrganizationIdsTest(){
28
ed831b2fc156 temporarily stored
one
parents: 19
diff changeset
15 JuGrix jugrix = new JuGrix(false);
ed831b2fc156 temporarily stored
one
parents: 19
diff changeset
16 LinkedList<String> list = new LinkedList<String>();
ed831b2fc156 temporarily stored
one
parents: 19
diff changeset
17 Iterator<String> ids = jugrix.childOrganizationIds("o:2", list);
16
4cfa77c61ee1 add childOrganizationIdsTest and Method
one
parents:
diff changeset
18
4cfa77c61ee1 add childOrganizationIdsTest and Method
one
parents:
diff changeset
19 Assert.assertTrue(ids.hasNext());
31
7f70341a78bc all function use index
one
parents: 28
diff changeset
20 Assert.assertEquals(ids.next(),"o:9");
34
96dcbd8e2fcb refactoring
one
parents: 32
diff changeset
21 Assert.assertTrue(ids.hasNext());
16
4cfa77c61ee1 add childOrganizationIdsTest and Method
one
parents:
diff changeset
22 Assert.assertEquals(ids.next(),"o:3");
28
ed831b2fc156 temporarily stored
one
parents: 19
diff changeset
23
ed831b2fc156 temporarily stored
one
parents: 19
diff changeset
24 JuGrix indexJugrix = new JuGrix(true);
ed831b2fc156 temporarily stored
one
parents: 19
diff changeset
25 ids = indexJugrix.childOrganizationIds("o:2", list);
ed831b2fc156 temporarily stored
one
parents: 19
diff changeset
26
ed831b2fc156 temporarily stored
one
parents: 19
diff changeset
27 Assert.assertTrue(ids.hasNext());
31
7f70341a78bc all function use index
one
parents: 28
diff changeset
28 Assert.assertEquals(ids.next(),"o:9");
34
96dcbd8e2fcb refactoring
one
parents: 32
diff changeset
29 Assert.assertTrue(ids.hasNext());
28
ed831b2fc156 temporarily stored
one
parents: 19
diff changeset
30 Assert.assertEquals(ids.next(),"o:3");
16
4cfa77c61ee1 add childOrganizationIdsTest and Method
one
parents:
diff changeset
31 }
4cfa77c61ee1 add childOrganizationIdsTest and Method
one
parents:
diff changeset
32 }