Mercurial > hg > Database > jungle-sharp
comparison 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 |
comparison
equal
deleted
inserted
replaced
12:b71d9ea6bd8e | 13:4c8932dad7b2 |
---|---|
1 using UnityEngine; | |
2 using System.Collections; | |
3 using MsgPack; | |
4 using System; | |
5 | |
6 public class NetworkPutAttributeOperationTest : MonoBehaviour { | |
7 | |
8 // Use this for initialization | |
9 void Start () { | |
10 byte[] value = System.Text.ASCIIEncoding.UTF8.GetBytes("test"); | |
11 NetworkPutAttributeOperation op = new NetworkPutAttributeOperation("hoge", value); | |
12 | |
13 ObjectPacker pack = new ObjectPacker(); | |
14 // send this byte to server. | |
15 byte[] packValue = pack.Pack(op); | |
16 | |
17 ObjectPacker unpack = new ObjectPacker(); | |
18 NetworkPutAttributeOperation nOp = unpack.Unpack<NetworkPutAttributeOperation>(packValue); | |
19 print(System.Text.ASCIIEncoding.UTF8.GetString(nOp.getValue())); | |
20 print (nOp.getCommand()); | |
21 } | |
22 } |