This commit is contained in:
vis2k 2021-03-10 21:08:40 +08:00
parent be2369f4a1
commit 956bfff3ad

View File

@ -1,5 +1,4 @@
using System.Collections; using System.Collections;
using System.Reflection;
using NUnit.Framework; using NUnit.Framework;
using UnityEngine; using UnityEngine;
using UnityEngine.TestTools; using UnityEngine.TestTools;
@ -12,9 +11,7 @@ public class ClientSceneTests_LocalPlayer : ClientSceneTestsBase
public void Setup() public void Setup()
{ {
Debug.Assert(NetworkClient.localPlayer == null, "LocalPlayer should be null before this test"); Debug.Assert(NetworkClient.localPlayer == null, "LocalPlayer should be null before this test");
NetworkClient.readyConnection = new FakeNetworkConnection();
PropertyInfo readyConnProperty = typeof(ClientScene).GetProperty(nameof(NetworkClient.readyConnection));
readyConnProperty.SetValue(null, new FakeNetworkConnection());
} }
NetworkIdentity SpawnObject(bool localPlayer) NetworkIdentity SpawnObject(bool localPlayer)