public void TestAvailable() { transport1.Available().Returns(true); transport2.Available().Returns(false); transport.Awake(); Assert.That(transport.Available()); }
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); }