mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkIdentityTest: GetSetAssetId
This commit is contained in:
parent
22ee387470
commit
ebe12b6cdb
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user