From ddd4b0b1fcf5ba1c71787dcd0157e03a3a30b30e Mon Sep 17 00:00:00 2001 From: uwee Date: Wed, 22 Apr 2020 03:38:07 -0400 Subject: [PATCH] use HostSetup in tests (#1761) --- .../Tests/Runtime/NetworkManagerTests.cs | 2 +- .../Mirror/Tests/Runtime/NetworkServerTest.cs | 22 +------------------ 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/Assets/Mirror/Tests/Runtime/NetworkManagerTests.cs b/Assets/Mirror/Tests/Runtime/NetworkManagerTests.cs index a69b17761..101f78ac5 100644 --- a/Assets/Mirror/Tests/Runtime/NetworkManagerTests.cs +++ b/Assets/Mirror/Tests/Runtime/NetworkManagerTests.cs @@ -5,7 +5,7 @@ namespace Mirror.Tests { - public class NetworkManagerTests + public class NetworkManagerTests : HostSetup { Scene activeScene; diff --git a/Assets/Mirror/Tests/Runtime/NetworkServerTest.cs b/Assets/Mirror/Tests/Runtime/NetworkServerTest.cs index 1d0588009..c5cb8c4af 100644 --- a/Assets/Mirror/Tests/Runtime/NetworkServerTest.cs +++ b/Assets/Mirror/Tests/Runtime/NetworkServerTest.cs @@ -6,28 +6,8 @@ namespace Mirror.Tests { [TestFixture] - public class NetworkServerRuntimeTest + public class NetworkServerRuntimeTest : HostSetup { - private GameObject transportGameObject; - - [SetUp] - public void SetUp() - { - transportGameObject = new GameObject("Transport"); - Transport.activeTransport = transportGameObject.AddComponent(); - } - - [TearDown] - public void TearDown() - { - // reset all state - NetworkServer.Shutdown(); - - Transport.activeTransport = null; - Object.Destroy(transportGameObject); - } - - [UnityTest] public IEnumerator DestroyPlayerForConnectionTest() {