use HostSetup in tests (#1761)

This commit is contained in:
uwee 2020-04-22 03:38:07 -04:00 committed by GitHub
parent 262c1129dc
commit ddd4b0b1fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 22 deletions

View File

@ -5,7 +5,7 @@
namespace Mirror.Tests
{
public class NetworkManagerTests
public class NetworkManagerTests : HostSetup
{
Scene activeScene;

View File

@ -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<MemoryTransport>();
}
[TearDown]
public void TearDown()
{
// reset all state
NetworkServer.Shutdown();
Transport.activeTransport = null;
Object.Destroy(transportGameObject);
}
[UnityTest]
public IEnumerator DestroyPlayerForConnectionTest()
{