NetworkIdentityTests (runtime): reuse MirrorPlayModeTest

This commit is contained in:
vis2k 2021-05-26 19:33:28 +08:00
parent 9b78ee82f1
commit a143124941

View File

@ -5,22 +5,17 @@
namespace Mirror.Tests.Runtime
{
public class NetworkIdentityTests
public class NetworkIdentityTests : MirrorPlayModeTest
{
GameObject gameObject;
NetworkIdentity identity;
[SetUp]
public void SetUp()
[UnitySetUp]
public override IEnumerator UnitySetUp()
{
gameObject = new GameObject();
identity = gameObject.AddComponent<NetworkIdentity>();
}
[TearDown]
public void TearDown()
{
GameObject.Destroy(gameObject);
yield return base.UnitySetUp();
CreateNetworked(out gameObject, out identity);
yield return null;
}
// prevents https://github.com/vis2k/Mirror/issues/1484