diff src/test/alice/jungle/core/operations/NetworkAppendChildOperationTest.java @ 71:f1aef52c0611

Added NetworkAppendChildAtTest
author one
date Fri, 11 Oct 2013 18:24:46 +0900
parents
children 9ab7d515e076
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/test/alice/jungle/core/operations/NetworkAppendChildOperationTest.java	Fri Oct 11 18:24:46 2013 +0900
@@ -0,0 +1,25 @@
+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);
+		assertEquals(op.getCommand(), mOp.getCommand());
+		assertEquals(op.getPosition(), 1);
+		assertEquals(op.getPosition(), mOp.getPosition());
+
+	}
+	
+	
+}