fix tests

This commit is contained in:
vis2k 2022-10-03 07:35:46 +02:00
parent cf08450dcc
commit ea3692e5a5

View File

@ -73,11 +73,10 @@ public void ServerCallback_float_out_Function(out float value)
} }
} }
public class AttributeTest_NetworkBehaviour public class AttributeTest_NetworkBehaviour
{ {
AttributeBehaviour_NetworkBehaviour behaviour; AttributeBehaviour_NetworkBehaviour behaviour;
GameObject go; GameObject go;
[SetUp] [SetUp]
public void SetUp() public void SetUp()
@ -94,7 +93,6 @@ public void TearDown()
UnityEngine.Object.DestroyImmediate(go); UnityEngine.Object.DestroyImmediate(go);
} }
[Test] [Test]
[TestCase(true)] [TestCase(true)]
[TestCase(false)] [TestCase(false)]
@ -207,7 +205,10 @@ public void ServerCallback_float_setsOutValue(bool active)
public class AttributeBehaviour_MonoBehaviour : MonoBehaviour public class AttributeBehaviour_MonoBehaviour : MonoBehaviour
{ {
public static readonly float Expected_float = 2020f; public static readonly float Expected_float = 2020f;
public static readonly ClassWithNoConstructor Expected_ClassWithNoConstructor = new ClassWithNoConstructor { a = 10 }; public static readonly ClassWithNoConstructor Expected_ClassWithNoConstructor = new ClassWithNoConstructor
{
a = 10
};
public static readonly ClassWithConstructor Expected_ClassWithConstructor = new ClassWithConstructor(29); public static readonly ClassWithConstructor Expected_ClassWithConstructor = new ClassWithConstructor(29);
[Client] [Client]
@ -355,17 +356,19 @@ public void ServerCallback_ClassWithConstructor_out_Function(out ClassWithConstr
} }
} }
public class AttributeTest_MonoBehaviour public class AttributeTest_MonoBehaviour
{ {
AttributeBehaviour_MonoBehaviour behaviour; AttributeBehaviour_MonoBehaviour behaviour;
GameObject go; NetClient NetworkClient;
GameObject go;
[SetUp] [SetUp]
public void SetUp() public void SetUp()
{ {
go = new GameObject(); go = new GameObject();
behaviour = go.AddComponent<AttributeBehaviour_MonoBehaviour>(); behaviour = go.AddComponent<AttributeBehaviour_MonoBehaviour>();
NetworkClient = go.AddComponent<NetClient>();
NetworkClient.Awake();
} }
[TearDown] [TearDown]
@ -376,7 +379,6 @@ public void TearDown()
UnityEngine.Object.DestroyImmediate(go); UnityEngine.Object.DestroyImmediate(go);
} }
[Test] [Test]
[TestCase(true)] [TestCase(true)]
[TestCase(false)] [TestCase(false)]