Esempio n. 1
0
        public void BeforeEachTest()
        {
            _errorHandler1 = new Mock <IServerErrorHandler>(MockBehavior.Strict);
            _errorHandler2 = new Mock <IServerErrorHandler>(MockBehavior.Strict);

            _sut = new ServerErrorHandlerCollection();

            _tokenSource = new CancellationTokenSource();

            _rpcContext = new Mock <ServerCallContext>(MockBehavior.Strict);
            _rpcContext
            .Protected()
            .SetupGet <CancellationToken>("CancellationTokenCore")
            .Returns(_tokenSource.Token);

            _errorContext = new ServerCallInterceptorContext(_rpcContext.Object);
        }
Esempio n. 2
0
        public void Ctor()
        {
            var sut = new ServerErrorHandlerCollection(_errorHandler1.Object);

            sut.Pipeline.ShouldBe(new[] { _errorHandler1.Object });
        }