Esempio n. 1
0
        public void ServerCallback_ClassWithConstructor_setsOutValue(bool active)
        {
            NetworkServer.active = active;
            ClassWithConstructor expected = active ? AttributeBehaviour_MonoBehaviour.Expected_ClassWithConstructor : default;

            behaviour.ServerCallback_ClassWithConstructor_out_Function(out ClassWithConstructor actual);
            Assert.AreEqual(expected, actual);
        }
Esempio n. 2
0
        public void ClientCallback_ClassWithConstructor_setsOutValue(bool active)
        {
            NetworkClient.connectState = active ? ConnectState.Connected : ConnectState.None;
            ClassWithConstructor expected = active ? AttributeBehaviour_MonoBehaviour.Expected_ClassWithConstructor : default;

            behaviour.ClientCallback_ClassWithConstructor_out_Function(out ClassWithConstructor actual);
            Assert.AreEqual(expected, actual);
        }
Esempio n. 3
0
        public void Server_ClassWithConstructor_setsOutValue(bool active)
        {
            NetworkServer.active = active;
            ClassWithConstructor expected = active ? AttributeBehaviour_MonoBehaviour.Expected_ClassWithConstructor : default;

            if (!active)
            {
                LogAssert.Expect(LogType.Warning, "[Server] function 'System.Void Mirror.Tests.Attributes.AttributeBehaviour_MonoBehaviour::Server_ClassWithConstructor_out_Function(Mirror.Tests.Attributes.ClassWithConstructor&)' called when server was not active");
            }
            behaviour.Server_ClassWithConstructor_out_Function(out ClassWithConstructor actual);
            Assert.AreEqual(expected, actual);
        }
Esempio n. 4
0
        public void Client_ClassWithConstructor_setsOutValue(bool active)
        {
            NetworkClient.connectState = active ? ConnectState.Connected : ConnectState.None;
            ClassWithConstructor expected = active ? AttributeBehaviour_MonoBehaviour.Expected_ClassWithConstructor : default;

            if (!active)
            {
                LogAssert.Expect(LogType.Warning, "[Client] function 'System.Void Mirror.Tests.Attributes.AttributeBehaviour_MonoBehaviour::Client_ClassWithConstructor_out_Function(Mirror.Tests.Attributes.ClassWithConstructor&)' called when client was not active");
            }
            behaviour.Client_ClassWithConstructor_out_Function(out ClassWithConstructor actual);
            Assert.AreEqual(expected, actual);
        }
Esempio n. 5
0
 public void ServerCallback_ClassWithConstructor_out_Function(out ClassWithConstructor value)
 {
     value = Expected_ClassWithConstructor;
 }
Esempio n. 6
0
 public void Client_ClassWithConstructor_out_Function(out ClassWithConstructor value)
 {
     value = Expected_ClassWithConstructor;
 }