Exemplo n.º 1
0
        public void TestAvailable()
        {
            transport1.Available().Returns(true);
            transport2.Available().Returns(false);
            transport.Awake();

            Assert.That(transport.Available());
        }
Exemplo n.º 2
0
        public void TestAvailable(bool available)
        {
            inner.Available().Returns(available);

            Assert.That(middleware.Available(), Is.EqualTo(available));

            inner.Received(1).Available();
        }
Exemplo n.º 3
0
        public void DisableShouldDisableAvailableTransport()
        {
            // make transport2 the active transport
            transport1.Available().Returns(false);
            transport.Awake();

            // starts enabled
            Assert.That(transport2.enabled, Is.True);

            // disabling FallbackTransport
            transport.enabled = false;
            Assert.That(transport2.enabled, Is.False);

            // enabling FallbackTransport
            transport.enabled = true;
            Assert.That(transport2.enabled, Is.True);
        }
Exemplo n.º 4
0
Arquivo: Monke.cs Projeto: dededec/TFG
 public override bool Available() => CommunicationTransport.Available();