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); }
public void Ctor() { var sut = new ServerErrorHandlerCollection(_errorHandler1.Object); sut.Pipeline.ShouldBe(new[] { _errorHandler1.Object }); }