Beispiel #1
0
        public void OnVpnDisconnected_ManualDisconnect_RestoreInternet()
        {
            // Arrange
            var sut = new Service.KillSwitch.KillSwitch(_firewall, _serviceSettings);

            // Act
            sut.OnVpnDisconnected(GetDisconnectedVpnState(true));

            // Assert
            _firewall.Received(1).DisableLeakProtection();
        }
Beispiel #2
0
        public void OnVpnDisconnected_UnexpectedDisconnectWithKillSwitchOff_RestoreInternet()
        {
            // Arrange
            _serviceSettings.KillSwitchMode.Returns(KillSwitchMode.Off);
            var sut = new Service.KillSwitch.KillSwitch(_firewall, _serviceSettings, _networkInterfaceLoader);

            // Act
            sut.OnVpnDisconnected(GetDisconnectedVpnState());

            // Assert
            _firewall.Received(1).DisableLeakProtection();
        }
Beispiel #3
0
        public void OnVpnDisconnected_UnexpectedDisconnectWithKillSwitchOff_RestoreInternet()
        {
            // Arrange
            _serviceSettings.KillSwitchSettings.Returns(new KillSwitchSettingsContract
            {
                Enabled = false
            });
            var sut = new Service.KillSwitch.KillSwitch(_firewall, _serviceSettings);

            // Act
            sut.OnVpnDisconnected(GetDisconnectedVpnState());

            // Assert
            _firewall.Received(1).DisableLeakProtection();
        }