Пример #1
0
        public void TearDown()
        {
            if (_t2gManager != null)
            {
                _t2gManager.Dispose();
            }

            _t2gManager = null;

            _sessionData      = null;
            _localDataStorage = null;
            //_notifierTarget = null;
            //_connectionListener = null;
            _fileDistributionManager = null;
            _notifier          = null;
            _connectionManager = null;
        }
Пример #2
0
        public void Setup()
        {
            ServiceConfiguration.Initialize();
            //_sessionData = new Mock<T2GSessionData>();
            _sessionData = new T2GSessionData();
            //_localDataStorage = new Mock<T2GLocalDataStorage>(_sessionData);
            _localDataStorage = new T2GLocalDataStorage(_sessionData, false);
            //_notifierTarget = new Mock<IT2GNotifierTarget>();
            //_connectionListener = new Mock<IT2GConnectionListener>();
            //_fileDistributionManager = new Mock<T2GFileDistributionManager>(_sessionData, _notifierTarget.Object);
            _fileDistributionManager = new T2GFileDistributionManager(_sessionData, this);
            //_notifier = new Mock<T2GNotificationProcessor>(_notifierTarget.Object, _localDataStorage, _fileDistributionManager.Object);
            _notifier = new T2GNotificationProcessor(this, _localDataStorage, _fileDistributionManager);
            //_connectionManager = new Mock<T2GConnectionManager>(_sessionData, _connectionListener.Object);
            //_connectionManager = new MockT2GConnectionManager();
            _connectionManager = new Mock <IT2GConnectionManager>();

            //_t2gManager = new T2GManager(_sessionData, _localDataStorage, _fileDistributionManager, _notifier, _connectionManager);
            _t2gManager = new T2GManager(_sessionData, _localDataStorage, _fileDistributionManager, _notifier, _connectionManager.Object);
        }