示例#1
0
        public void BeforeEachTest()
        {
            _sut = new ClientErrorHandlerCollection();

            _tokenSource = new CancellationTokenSource();

            var method = new Mock <IMethod>(MockBehavior.Strict);

            _callContext = new ClientCallInterceptorContext(new CallOptions(new Metadata(), cancellationToken: _tokenSource.Token), null, method.Object);

            _faultDetail = new ClientFaultDetail(new RpcException(Status.DefaultCancelled), new object());

            _errorHandler1 = new Mock <IClientErrorHandler>(MockBehavior.Strict);
            _errorHandler2 = new Mock <IClientErrorHandler>(MockBehavior.Strict);
        }
示例#2
0
        public void Ctor()
        {
            var sut = new ClientErrorHandlerCollection(_errorHandler1.Object);

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