private void Arrange() { var random = new Random(); _localChannelNumber = (uint)random.Next(0, int.MaxValue); _localWindowSize = (uint)random.Next(1000, int.MaxValue); _localPacketSize = _localWindowSize - 1; _onOpenFailureException = new SystemException(); _channelExceptionRegister = new List<ExceptionEventArgs>(); _sessionMock = new Mock<ISession>(MockBehavior.Strict); _channel = new ClientChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize); _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args); _channel.OnOpenFailureException = _onOpenFailureException; }
private void Arrange() { var random = new Random(); _localChannelNumber = (uint)random.Next(0, int.MaxValue); _localWindowSize = (uint)random.Next(1000, int.MaxValue); _localPacketSize = _localWindowSize - 1; _onOpenFailureException = new SystemException(); _channelExceptionRegister = new List <ExceptionEventArgs>(); _sessionMock = new Mock <ISession>(MockBehavior.Strict); _channel = new ClientChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize); _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args); _channel.OnOpenFailureException = _onOpenFailureException; }