mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
use HostSetup in tests (#1761)
This commit is contained in:
parent
262c1129dc
commit
ddd4b0b1fc
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
namespace Mirror.Tests
|
namespace Mirror.Tests
|
||||||
{
|
{
|
||||||
public class NetworkManagerTests
|
public class NetworkManagerTests : HostSetup
|
||||||
{
|
{
|
||||||
Scene activeScene;
|
Scene activeScene;
|
||||||
|
|
||||||
|
@ -6,28 +6,8 @@
|
|||||||
namespace Mirror.Tests
|
namespace Mirror.Tests
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[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]
|
[UnityTest]
|
||||||
public IEnumerator DestroyPlayerForConnectionTest()
|
public IEnumerator DestroyPlayerForConnectionTest()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user