Mercurial > hg > Database > jungle-network
view src/test/alice/jungle/core/operations/NetworkAppendChildOperationTest.java @ 74:19e278488b42
Added NetworkPutAttributeOperation
author | one |
---|---|
date | Tue, 15 Oct 2013 14:38:46 +0900 |
parents | 9ab7d515e076 |
children | 0055d917c796 |
line wrap: on
line source
package test.alice.jungle.core.operations; import java.io.IOException; import org.msgpack.MessagePack; import org.msgpack.type.Value; import alice.jungle.operations.NetworkAppendChildAtOperation; import junit.framework.TestCase; public class NetworkAppendChildOperationTest extends TestCase { public void testMsgpackConvert() throws IOException { NetworkAppendChildAtOperation op = new NetworkAppendChildAtOperation(1); MessagePack msgpack = new MessagePack(); Value v = msgpack.unconvert(op); NetworkAppendChildAtOperation mOp = msgpack.convert(v, NetworkAppendChildAtOperation.class); // NodeOperation mOp = msgpack.convert(v, NodeOperation.class); assertEquals(op.getCommand(), mOp.getCommand()); assertEquals(op.getPosition(), 1); assertEquals(op.getPosition(), mOp.getPosition()); } }