42
|
1 package jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core.nodeeditor;
|
|
2
|
80
|
3
|
81
|
4 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.TreeNode;
|
42
|
5 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.trasnformer.AppendChildAt;
|
54
|
6 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.transaction.DefaultTreeNode;
|
42
|
7 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Either;
|
|
8 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Error;
|
108
|
9 import jp.ac.u_ryukyu.ie.cr.tatsuki.jungle.store.index.Logging;
|
42
|
10 import junit.framework.Assert;
|
|
11 import junit.framework.TestCase;
|
|
12
|
|
13 public class AppendChildAtTest extends TestCase
|
|
14 {
|
|
15 public void testEdit()
|
|
16 {
|
81
|
17 TreeNode node = new DefaultTreeNode();
|
42
|
18 AppendChildAt op = new AppendChildAt(0);
|
108
|
19 Either<Error, Logging> either = op.edit(node);
|
42
|
20 if(either.isA()){
|
|
21 Assert.fail();
|
|
22 }
|
|
23
|
108
|
24 Logging newNode = either.b();
|
54
|
25 Assert.assertEquals(1,newNode.getChildren().size());
|
42
|
26 }
|
|
27 }
|