Mercurial > hg > Members > nobuyasu > jungle-network
view src/test/java/alice/jungle/core/operations/NetworkTreeOperationLogTest.java @ 195:82698be06c6c default tip
change index TreeMap
author | tatsuki |
---|---|
date | Tue, 28 Apr 2015 07:51:41 +0900 |
parents | f9e29a52efd3 |
children |
line wrap: on
line source
package alice.jungle.core.operations; import java.io.IOException; import alice.jungle.operations.NetworkAppendChildAtOperation; import alice.jungle.operations.NetworkNodePath; import alice.jungle.operations.NetworkTreeOperationLog; import org.msgpack.MessagePack; import org.msgpack.type.Value; import junit.framework.TestCase; public class NetworkTreeOperationLogTest extends TestCase { public void testMsgpackConvert() throws IOException { NetworkAppendChildAtOperation op = new NetworkAppendChildAtOperation(1); NetworkNodePath path = new NetworkNodePath(); path.add(1).add(2); NetworkTreeOperationLog log = new NetworkTreeOperationLog(); log.add(path, op); log.add(path, op); MessagePack msgpack = new MessagePack(); Value v = msgpack.unconvert(log); NetworkTreeOperationLog mLog = msgpack.convert(v, NetworkTreeOperationLog.class); assertNotNull(mLog); } }