Mercurial > hg > Members > tatsuki > bench > jungle-core
comparison src/test/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/impl/node/DefaultAttributesTest.java @ 75:26dfa90016d1
error delete but 2 test program commentout and not action BulletinBoard
Traverser is bad
author | one |
---|---|
date | Wed, 27 Aug 2014 05:52:46 +0900 |
parents | 7d78bbf4a9cd |
children | 715a9fbf02fc |
comparison
equal
deleted
inserted
replaced
74:3a3622cf2eef | 75:26dfa90016d1 |
---|---|
9 import fj.data.List; | 9 import fj.data.List; |
10 import fj.data.Option; | 10 import fj.data.Option; |
11 import fj.data.TreeMap; | 11 import fj.data.TreeMap; |
12 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core.AttributesTest; | 12 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core.AttributesTest; |
13 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.DefaultAttributes; | 13 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.DefaultAttributes; |
14 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.DefaultNode; | 14 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.transaction.DefaultTreeNode; |
15 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.transaction.DefaultTreeNodeAttribute; | |
15 | 16 |
16 public class DefaultAttributesTest extends AttributesTest | 17 public class DefaultAttributesTest extends AttributesTest |
17 { | 18 { |
18 public DefaultAttributes instance() | 19 public DefaultTreeNodeAttribute instance() |
19 { | 20 { |
20 List<DefaultNode> rawList = List.nil(); | 21 List<DefaultTreeNode> rawList = List.nil(); |
21 TreeMap<String,ByteBuffer> rawMap = TreeMap.empty(Ord.stringOrd); | 22 TreeMap<String,ByteBuffer> rawMap = TreeMap.empty(Ord.stringOrd); |
22 | 23 |
23 // add attributes | 24 // add attributes |
24 | 25 |
25 for(P2<String, ByteBuffer> entry : ENTRIES){ | 26 for(P2<String, ByteBuffer> entry : ENTRIES){ |
26 rawMap = rawMap.set(entry._1(),entry._2()); | 27 rawMap = rawMap.set(entry._1(),entry._2()); |
27 } | 28 } |
28 | 29 |
29 DefaultNode node = new DefaultNode(rawList,rawMap); | 30 DefaultTreeNode node = new DefaultTreeNode(rawList,rawMap); |
30 return node.getAttributes(); | 31 return node.getAttributes(); |
31 } | 32 } |
32 | 33 |
33 public void testGetAttributesAsRawMap() | 34 public void testGetAttributesAsRawMap() |
34 { | 35 { |
35 DefaultAttributes attrs = instance(); | 36 DefaultTreeNodeAttribute attrs = instance(); |
36 TreeMap<String,ByteBuffer> rawMap = attrs.getAttributesAsRawMap(); | 37 TreeMap<String,ByteBuffer> rawMap = attrs.getAttributesAsRawMap(); |
37 | 38 |
38 // testing rawmap is not null. | 39 // testing rawmap is not null. |
39 Assert.assertNotNull(rawMap); | 40 Assert.assertNotNull(rawMap); |
40 | 41 |