Mercurial > hg > Database > jungle-sharp
view src/test/csharp/jp.ac.u-ryukyu.ie.cr/jungle-network/operations/NetworkPutAttributeOperationTest.cs @ 13:4c8932dad7b2
Add Test and only NetworkTreeOperationLogTest.cs not work.
author | Kazuma |
---|---|
date | Sun, 23 Oct 2016 13:35:21 +0900 |
parents | |
children |
line wrap: on
line source
using UnityEngine; using System.Collections; using MsgPack; using System; public class NetworkPutAttributeOperationTest : MonoBehaviour { // Use this for initialization void Start () { byte[] value = System.Text.ASCIIEncoding.UTF8.GetBytes("test"); NetworkPutAttributeOperation op = new NetworkPutAttributeOperation("hoge", value); ObjectPacker pack = new ObjectPacker(); // send this byte to server. byte[] packValue = pack.Pack(op); ObjectPacker unpack = new ObjectPacker(); NetworkPutAttributeOperation nOp = unpack.Unpack<NetworkPutAttributeOperation>(packValue); print(System.Text.ASCIIEncoding.UTF8.GetString(nOp.getValue())); print (nOp.getCommand()); } }