Ejemplo n.º 1
0
        public void Setup()
        {
            base.SetUp();

            transport = holder.AddComponent <MultiplexTransport>();

            transport1           = Substitute.For <Transport>();
            transport2           = Substitute.For <Transport>();
            transport.transports = new[] { transport1, transport2 };

            transport.Awake();
        }
Ejemplo n.º 2
0
        public void SetupMultipex()
        {
            transport1 = Substitute.For <Transport>();
            transport2 = Substitute.For <Transport>();

            var gameObject = new GameObject();

            transport            = gameObject.AddComponent <MultiplexTransport>();
            transport.transports = new[] { transport1, transport2 };

            transport.Awake();
        }
        public void Setup()
        {
            GameObject gameObject = new GameObject();

            // set inactive so that awake isnt called
            gameObject.SetActive(false);

            transport1 = gameObject.AddComponent <MemoryTransport>();
            transport2 = gameObject.AddComponent <MemoryTransport>();

            transport            = gameObject.AddComponent <MultiplexTransport>();
            transport.transports = new[] { transport1, transport2 };

            gameObject.SetActive(true);
        }
Ejemplo n.º 4
0
        public void Setup()
        {
            transportObj = new GameObject();

            transport = transportObj.AddComponent <MultiplexTransport>();

            // this gives warnings,  it is ok
            transport1 = Substitute.For <Transport>();
            transport2 = Substitute.For <Transport>();

            transport1.Supported.Returns(true);
            transport2.Supported.Returns(true);

            transport.transports = new[] { transport1, transport2 };
            conn1 = Substitute.For <IConnection>();
            conn2 = Substitute.For <IConnection>();
        }