public void TearDown() { _serverSessionFactory = null; _socketAcceptorFactory = null; _packetScheduler = null; _rollingIvFactoryProvider = null; _ivGenerator = null; _logger = null; }
public void SetUp() { this.serverSessionFactory = Mock.Of<IServerSessionFactory>(); var socketAcceptorFactoryMock = new Mock<ISocketAcceptorFactory>(); socketAcceptorFactoryMock .Setup(saf => saf.CreateSocketAcceptor(It.IsAny<IPEndPoint>())) .Returns<IPEndPoint>(endpoint => new SocketAcceptor(endpoint)); this.socketAcceptorFactory = socketAcceptorFactoryMock.Object; this.packetScheduler = Mock.Of<IPacketScheduler>(); this.rollingIvFactoryProvider = Mock.Of<IRollingIvFactoryProvider>(); this.ivGenerator = new IvGenerator(new RNGCryptoServiceProvider()); this.logger = Mock.Of<ILogger>(); }
public void SetUp() { _serverSessionFactory = Mock.Of <IServerSessionFactory>(); var socketAcceptorFactoryMock = new Mock <ISocketAcceptorFactory>(); socketAcceptorFactoryMock .Setup(saf => saf.CreateSocketAcceptor(It.IsAny <IPEndPoint>())) .Returns <IPEndPoint>(endpoint => new SocketAcceptor(endpoint)); _socketAcceptorFactory = socketAcceptorFactoryMock.Object; _packetScheduler = Mock.Of <IPacketScheduler>(); _rollingIvFactoryProvider = Mock.Of <IRollingIvFactoryProvider>(); _ivGenerator = new IvGenerator(new RNGCryptoServiceProvider()); _logger = Mock.Of <ILogger>(); }
/// <summary> /// Initializes a new instance of the <see cref="ServerProcess"/> class. /// </summary> public ServerProcess( IServerSessionFactory sessionFactory, ISocketAcceptorFactory socketAcceptorFactory, IPacketScheduler packetScheduler, IRollingIvFactoryProvider rollingIvFactoryProvider, IvGenerator ivGenerator, ILogger logger) { _sessionFactory = sessionFactory; _socketAcceptorFactory = socketAcceptorFactory; _packetScheduler = packetScheduler; _rollingIvFactoryProvider = rollingIvFactoryProvider; _ivGenerator = ivGenerator; _logger = logger; _isConfigured = false; _isDisposed = false; _isRunning = new AtomicBoolean(false); }
/// <summary> /// Initializes a new instance of the <see cref="ServerProcess"/> class. /// </summary> public ServerProcess( IServerSessionFactory sessionFactory, ISocketAcceptorFactory socketAcceptorFactory, IPacketScheduler packetScheduler, IRollingIvFactoryProvider rollingIvFactoryProvider, IvGenerator ivGenerator, ILogger logger) { this.sessionFactory = sessionFactory; this.socketAcceptorFactory = socketAcceptorFactory; this.packetScheduler = packetScheduler; this.rollingIvFactoryProvider = rollingIvFactoryProvider; this.ivGenerator = ivGenerator; this.logger = logger; this.isConfigured = false; this.isDisposed = false; this.isRunning = new AtomicBoolean(false); }
public void TearDown() { this.serverSessionFactory = null; this.socketAcceptorFactory = null; this.packetScheduler = null; this.rollingIvFactoryProvider = null; this.ivGenerator = null; this.logger = null; }