Mercurial > hg > Members > nobuyasu > jungle-network
comparison src/test/java/alice/jungle/core/operations/NetworkTreeOperationLogTest.java @ 105:f9e29a52efd3
Move some files
author | one |
---|---|
date | Tue, 26 Nov 2013 06:43:10 +0900 |
parents | src/test/alice/jungle/core/operations/NetworkTreeOperationLogTest.java@3f8ec40d536a |
children |
comparison
equal
deleted
inserted
replaced
104:03bf62bb699e | 105:f9e29a52efd3 |
---|---|
1 package alice.jungle.core.operations; | |
2 | |
3 import java.io.IOException; | |
4 | |
5 import alice.jungle.operations.NetworkAppendChildAtOperation; | |
6 import alice.jungle.operations.NetworkNodePath; | |
7 import alice.jungle.operations.NetworkTreeOperationLog; | |
8 | |
9 import org.msgpack.MessagePack; | |
10 import org.msgpack.type.Value; | |
11 | |
12 import junit.framework.TestCase; | |
13 | |
14 public class NetworkTreeOperationLogTest extends TestCase { | |
15 | |
16 public void testMsgpackConvert() throws IOException { | |
17 NetworkAppendChildAtOperation op = new NetworkAppendChildAtOperation(1); | |
18 NetworkNodePath path = new NetworkNodePath(); | |
19 path.add(1).add(2); | |
20 NetworkTreeOperationLog log = new NetworkTreeOperationLog(); | |
21 log.add(path, op); | |
22 log.add(path, op); | |
23 MessagePack msgpack = new MessagePack(); | |
24 Value v = msgpack.unconvert(log); | |
25 NetworkTreeOperationLog mLog = msgpack.convert(v, NetworkTreeOperationLog.class); | |
26 assertNotNull(mLog); | |
27 | |
28 } | |
29 | |
30 } |