Пример #1
0
        public void TearDown()
        {
            _voiceServer.Stop();
            _voiceServer.Dispose();
            _voiceServer = null;

            _voiceWrapper = null;
        }
Пример #2
0
        public void SetUp()
        {
            _voiceWrapper = new VoiceWrapperEventInvoker();
            _voiceWrapper.Mock.Setup(e => e.StartNativeServer()).Returns(true);

            _voiceServer = new FakeVoiceServer(new FakeVoiceClientFactory(), new VoiceServerConfiguration("localhost", 23332, "Identit3y7rrV3RYNiC3MnupTwgeA=", 130, "123"), _voiceWrapper);
            _voiceServer.Start();
        }
Пример #3
0
        public void SetUp()
        {
            _voiceWrapper = new VoiceWrapperEventInvoker();
            _voiceServer  = new FakeVoiceServer(new FakeVoiceClientFactory(), new VoiceServerConfiguration("localhost", 23332, "jfdsjlsdflk==", 123, "secret"), _voiceWrapper);

            _voiceClient = _voiceServer.PrepareClient(1);

            _voiceServer.OnClientConnecting            += (client, id, args) => _clientConnectingInvokes++;
            _voiceServer.OnClientConnected             += client => _clientConnectedInvokes++;
            _voiceServer.OnClientDisconnected          += client => _clientDisconnectedInvokes++;
            _voiceServer.OnClientSpeakersMuteChanged   += (client, muted) => _clientSpeakersMuteInvokes++;
            _voiceServer.OnClientMicrophoneMuteChanged += (client, muted) => _clientMicrophoneMuteInvokes++;
            _voiceServer.OnClientRejected       += (client, code) => _clientRejectedInvokes++;
            _voiceServer.OnClientTalkingChanged += (client, status) => _clientTalkingChangedInvokes++;
        }
Пример #4
0
        public void TearDown()
        {
            _voiceServer.RemoveClient(_voiceClient);
            _voiceClient = null;

            _voiceServer.Dispose();
            _voiceServer = null;

            _voiceWrapper = null;

            _clientConnectingInvokes     = 0;
            _clientConnectedInvokes      = 0;
            _clientDisconnectedInvokes   = 0;
            _clientSpeakersMuteInvokes   = 0;
            _clientMicrophoneMuteInvokes = 0;
            _clientRejectedInvokes       = 0;
            _clientTalkingChangedInvokes = 0;
        }