public ServerMessagesReceiverTests()
 {
     LogManager.OutputToTrace();
     _sut=new FakeServerMessageReceiver();
     _sut.Add();
     _sut.PollingInterval = 50.ToMiliseconds();
     _router = Substitute.For<IDispatchReceivedMessages>();
 }
Exemple #2
0
        public ServerMessagesReceiverTests(ITestOutputHelper test)
        {
            _test = test;

            _sut = new FakeServerMessageReceiver();
            _sut.Add();
            _router = Substitute.For <IDispatchReceivedMessages>();
        }
Exemple #3
0
        public async Task exceptions_thrown_by_router_dont_break_other_messages()
        {
            _router.DeliverToLocalProcessors(_sut.Envelopes[0]).Throws(new Exception("router exception"));
            _sut.Add();
            _sut.StartReceiving(_router);

            _sut.Next();

            _router.Received(2).DeliverToLocalProcessors(Arg.Any <EnvelopeToClient>());
            _sut.Handled.Should().Be(_sut.Envelopes[1]);
        }