annotate src/test/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/impl/clonable/NodePathCompareTest.java @ 138:b998fdc99bc0

add NodePathCompare and Test
author one
date Mon, 27 Oct 2014 19:04:59 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
138
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
1 package jp.ac.u_ryukyu.ie.cr.shoshi.jungle.impl.clonable;
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
2
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
3 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.NodePath;
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
4 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.DefaultNodePath;
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
5 import junit.framework.Assert;
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
6
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
7 import org.junit.Test;
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
8
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
9 public class NodePathCompareTest {
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
10
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
11 @Test
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
12 public void NodePathCompare(){
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
13 NodePath path = new DefaultNodePath();
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
14 path = path.add(0).add(1).add(2);
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
15 System.out.println(path.toString());
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
16
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
17 NodePath comparePath1 = new DefaultNodePath();
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
18 comparePath1 = comparePath1.add(0).add(1).add(2).add(3);
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
19
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
20 NodePath comparePath2 = new DefaultNodePath();
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
21 comparePath2 = comparePath2.add(0).add(1);
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
22
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
23 NodePath comparePath3 = new DefaultNodePath();
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
24 comparePath3 = comparePath3.add(1).add(1).add(2).add(3);
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
25
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
26 Assert.assertTrue(path.compare(comparePath1));
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
27 Assert.assertFalse(path.compare(comparePath2));
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
28 Assert.assertFalse(path.compare(comparePath3));
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
29 }
b998fdc99bc0 add NodePathCompare and Test
one
parents:
diff changeset
30 }