Пример #1
0
        public async Task OnTimerTick_ShouldShow_BlockedTrafficModal_WhenFreeServer()
        {
            // Arrange
            _blockedTraffic.Detected().Returns(true);
            P2PDetector detector = new P2PDetector(_logger, _appConfig, _blockedTraffic, _forwardedTraffic, _scheduler, _modals, _dialogs);
            await detector.OnVpnStateChanged(new VpnStateChangedEventArgs(VpnStatus.Connected, VpnError.None, FreeServer(), false));

            // Act
            _timer.Tick += Raise.Event();
            // Assert
            _dialogs.ReceivedWithAnyArgs(1).ShowWarning("");
        }