public async Task ReconnectShouldNotBeRequiredIfDisconnected() { // Arrange _appSettings.KillSwitch.Returns(false); var sut = new ReconnectState(_settingsBuilder); await sut.OnVpnStateChanged(GetVpnStateEventArgs(VpnStatus.Connected)); _appSettings.KillSwitch.Returns(true); // Act await sut.OnVpnStateChanged(GetVpnStateEventArgs(VpnStatus.Disconnected)); // Assert sut.Required(nameof(IAppSettings.KillSwitch)).Should().BeFalse(); }
public async Task ReconnectShouldNotBeRequiredIfDisconnected() { // Arrange _appSettings.OvpnProtocol.Returns("tcp"); var sut = new ReconnectState(_settingsBuilder); await sut.OnVpnStateChanged(GetVpnStateEventArgs(VpnStatus.Connected)); _appSettings.OvpnProtocol.Returns("udp"); // Act await sut.OnVpnStateChanged(GetVpnStateEventArgs(VpnStatus.Disconnected)); // Assert sut.Required(nameof(IAppSettings.OvpnProtocol)).Should().BeFalse(); }