annotate src/test/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/impl/node/DefaultChildrenTest.java @ 152:8a0aa8fc137c

Merge with a2c374a2686b82b0ad30f520412e191b84288fa9
author one
date Sat, 22 Nov 2014 15:25:09 +0900
parents 0854f9a9e81d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
1 package jp.ac.u_ryukyu.ie.cr.shoshi.jungle.impl.node;
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
2
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
3 import java.nio.ByteBuffer;
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
4
39
7d78bbf4a9cd added some tests
Shoshi TAMAKI
parents: 38
diff changeset
5 import org.junit.Assert;
7d78bbf4a9cd added some tests
Shoshi TAMAKI
parents: 38
diff changeset
6
38
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
7 import fj.Ord;
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
8 import fj.data.List;
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
9 import fj.data.TreeMap;
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
10 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core.ChildrenTest;
81
715a9fbf02fc remove <T> many source
one
parents: 78
diff changeset
11 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.TreeNode;
75
26dfa90016d1 error delete but 2 test program commentout and not action BulletinBoard
one
parents: 39
diff changeset
12 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.transaction.DefaultTreeNode;
26dfa90016d1 error delete but 2 test program commentout and not action BulletinBoard
one
parents: 39
diff changeset
13 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.transaction.DefaultTreeNodeChildren;
38
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
14
81
715a9fbf02fc remove <T> many source
one
parents: 78
diff changeset
15 public class DefaultChildrenTest extends ChildrenTest<TreeNode>
38
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
16 {
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
17
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
18 @Override
75
26dfa90016d1 error delete but 2 test program commentout and not action BulletinBoard
one
parents: 39
diff changeset
19 public DefaultTreeNodeChildren instance()
38
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
20 {
81
715a9fbf02fc remove <T> many source
one
parents: 78
diff changeset
21 List<TreeNode> rawList = List.nil();
38
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
22 for(int i = 0;i < expectSize();i ++){
75
26dfa90016d1 error delete but 2 test program commentout and not action BulletinBoard
one
parents: 39
diff changeset
23 rawList = rawList.cons(new DefaultTreeNode());
38
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
24 }
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
25
152
8a0aa8fc137c Merge with a2c374a2686b82b0ad30f520412e191b84288fa9
one
parents: 144
diff changeset
26 TreeMap<String,ByteBuffer> rawMap = TreeMap.empty(Ord.stringOrd);
38
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
27
75
26dfa90016d1 error delete but 2 test program commentout and not action BulletinBoard
one
parents: 39
diff changeset
28 return new DefaultTreeNode(rawList,rawMap).getChildren();
38
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
29 }
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
30
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
31 @Override
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
32 public int expectSize()
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
33 {
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
34 return 3;
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
35 }
39
7d78bbf4a9cd added some tests
Shoshi TAMAKI
parents: 38
diff changeset
36
7d78bbf4a9cd added some tests
Shoshi TAMAKI
parents: 38
diff changeset
37 public void testGetChildrenAsRawList()
7d78bbf4a9cd added some tests
Shoshi TAMAKI
parents: 38
diff changeset
38 {
75
26dfa90016d1 error delete but 2 test program commentout and not action BulletinBoard
one
parents: 39
diff changeset
39 DefaultTreeNodeChildren instance = instance();
81
715a9fbf02fc remove <T> many source
one
parents: 78
diff changeset
40 List<TreeNode> rawList = instance.getChildrenAsRawList();
39
7d78bbf4a9cd added some tests
Shoshi TAMAKI
parents: 38
diff changeset
41
7d78bbf4a9cd added some tests
Shoshi TAMAKI
parents: 38
diff changeset
42 Assert.assertNotNull(rawList);
7d78bbf4a9cd added some tests
Shoshi TAMAKI
parents: 38
diff changeset
43 Assert.assertEquals(expectSize(),rawList.length());
7d78bbf4a9cd added some tests
Shoshi TAMAKI
parents: 38
diff changeset
44 }
38
cb9fabaedfd4 added tests and changed testing provider to junit47
Shoshi TAMAKI
parents:
diff changeset
45 }