NetworkIdentityTest: GetSetAssetId

This commit is contained in:
vis2k 2020-02-26 18:15:14 +01:00
parent 22ee387470
commit ebe12b6cdb

View File

@ -1,4 +1,5 @@
using System.Collections;
using System;
using System.Collections;
using System.Collections.Generic;
using Mirror;
using NSubstitute;
@ -165,5 +166,23 @@ public void HostMode_IsFlags_Test()
// clean up
GameObject.DestroyImmediate(gameObject);
}
[Test]
public void GetSetAssetId()
{
// create a networkidentity
GameObject gameObject = new GameObject();
NetworkIdentity identity = gameObject.AddComponent<NetworkIdentity>();
// assign a guid
Guid guid = new Guid(0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B);
identity.assetId = guid;
// did it work?
Assert.That(identity.assetId, Is.EqualTo(guid));
// clean up
GameObject.DestroyImmediate(gameObject);
}
}
}