This commit is contained in:
vis2k 2021-08-07 13:19:43 +08:00
parent af94cb902c
commit fbd3342a76

View File

@ -32,7 +32,6 @@ public static MockQuest WriteQuest(this NetworkReader reader)
[TestFixture]
public class CustomRWTest
{
public struct QuestMessage : NetworkMessage
{
public MockQuest quest;
@ -41,15 +40,13 @@ public struct QuestMessage : NetworkMessage
[Test]
public void TestCustomRW()
{
QuestMessage message = new QuestMessage()
QuestMessage message = new QuestMessage
{
quest = new MockQuest(100)
};
byte[] data = MessagePackingTest.PackToByteArray(message);
QuestMessage unpacked = MessagePackingTest.UnpackFromByteArray<QuestMessage>(data);
Assert.That(unpacked.quest.Id, Is.EqualTo(100));
}
}