Mercurial > hg > Members > tatsuki > bench > jungle-core
comparison src/test/java/DefaultJungleTreeTest.java @ 54:650fe2a0dccc
modified tests
author | Shoshi TAMAKI |
---|---|
date | Fri, 08 Feb 2013 17:08:42 +0900 |
parents | 22d8966ab672 |
children | 26dfa90016d1 |
comparison
equal
deleted
inserted
replaced
53:ed890dcb673e | 54:650fe2a0dccc |
---|---|
1 import java.nio.ByteBuffer; | 1 import java.nio.ByteBuffer; |
2 | |
3 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.DefaultJungle; | 2 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.DefaultJungle; |
4 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.Jungle; | 3 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.Jungle; |
5 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.JungleTree; | 4 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.JungleTree; |
6 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.JungleTreeEditor; | 5 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.JungleTreeEditor; |
7 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core.Node; | 6 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core.Node; |
8 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.DefaultNodePath; | 7 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.DefaultNodePath; |
8 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.DefaultTreeEditor; | |
9 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.traverser.DefaultTraverser; | |
9 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.traverser.Result; | 10 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.traverser.Result; |
10 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Either; | 11 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Either; |
12 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Error; | |
11 import junit.framework.Assert; | 13 import junit.framework.Assert; |
12 import junit.framework.TestCase; | 14 import junit.framework.TestCase; |
13 | 15 |
14 | 16 |
15 public class DefaultJungleTreeTest extends TestCase | 17 public class DefaultJungleTreeTest extends TestCase |
16 { | 18 { |
17 public Jungle instance() | 19 public Jungle instance() |
18 { | 20 { |
19 Jungle j = new DefaultJungle("hogehoge"); | 21 Jungle j = new DefaultJungle(null,"hogehoge",new DefaultTreeEditor(new DefaultTraverser())); |
20 return j; | 22 return j; |
21 } | 23 } |
22 | 24 |
23 public static final String key = "KEY"; | 25 public static final String key = "KEY"; |
24 public static final ByteBuffer value = ByteBuffer.wrap(key.getBytes()); | 26 public static final ByteBuffer value = ByteBuffer.wrap(key.getBytes()); |
51 if(either.isA()){ | 53 if(either.isA()){ |
52 Assert.fail(); | 54 Assert.fail(); |
53 } | 55 } |
54 editor2 = either.b(); | 56 editor2 = either.b(); |
55 Either<Error,JungleTreeEditor> r = editor2.success(); | 57 Either<Error,JungleTreeEditor> r = editor2.success(); |
56 Assert.assertTrue(either.isA()); | 58 Assert.assertTrue(r.isA()); |
57 } | 59 } |
58 | 60 |
59 public void testIsolation() | 61 public void testIsolation() |
60 { | 62 { |
61 | 63 |