Exemplo n.º 1
0
        public void ServerCallback_ClassWithNoConstructor_setsOutValue(bool active)
        {
            NetworkServer.active = active;
            ClassWithNoConstructor expected = active ? AttributeBehaviour_MonoBehaviour.Expected_ClassWithNoConstructor : default;

            behaviour.ServerCallback_ClassWithNoConstructor_out_Function(out ClassWithNoConstructor actual);
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 2
0
        public void ClientCallback_ClassWithNoConstructor_setsOutValue(bool active)
        {
            NetworkClient.connectState = active ? ConnectState.Connected : ConnectState.None;
            ClassWithNoConstructor expected = active ? AttributeBehaviour_MonoBehaviour.Expected_ClassWithNoConstructor : default;

            behaviour.ClientCallback_ClassWithNoConstructor_out_Function(out ClassWithNoConstructor actual);
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 3
0
        public void Server_ClassWithNoConstructor_setsOutValue(bool active)
        {
            NetworkServer.active = active;
            ClassWithNoConstructor expected = active ? AttributeBehaviour_MonoBehaviour.Expected_ClassWithNoConstructor : default;

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

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