Exemple #1
0
        public void SetUp()
        {
            Registry.RegisterComponent(new Mock <IIoUtils>().Object);

            _mockLogs = new List <Mock <ILog> >
            {
                LogTestHelper.MockLog(),
                    LogTestHelper.MockLog(),
                    LogTestHelper.MockLog()
            };

            _mockLogFileManager = new Mock <ILogManager>();
            _mockLogFileManager.Setup(mgr => mgr.Logs).Returns(_mockLogs.Select(m => m.Object));

            _uut = new FeedbackViewModel(
                _mockLogFileManager.Object,
                Mock.Of <IExporter>(),
                Mock.Of <IKaVECommandGenerator>());
            _uut.Refresh();
            while (_uut.IsBusy)
            {
                Thread.Sleep(5);
            }

            _confirmationRequestHelper = _uut.ConfirmationRequest.NewTestHelper();
            _sessionViewModels         = _uut.Sessions.ToList();
        }
        public void SetUp()
        {
            _mockLog = LogTestHelper.MockLog();
            _uut     = new SessionViewModel(_mockLog.Object);

            _mockLogger = new Mock <ILogger>();
            Registry.RegisterComponent(_mockLogger.Object);
        }
        public void SetUp()
        {
            _mockLog = LogTestHelper.MockLog();
            _uut     = new SessionViewModel(_mockLog.Object, Mock.Of <IKaVECommandGenerator>());

            _mockLogger = new Mock <ILogger>();
            Registry.RegisterComponent(_mockLogger.Object);
        }
        public void SetUp()
        {
            _displayedEvents = TestEventFactory.SomeEvents(3);

            _mockLog = LogTestHelper.MockLog();
            _mockLog.Setup(log => log.ReadAll()).Returns(_displayedEvents);

            _uut = new SessionViewModel(_mockLog.Object, Mock.Of <IKaVECommandGenerator>());
            // ReSharper disable once UnusedVariable
            var tmp = _uut.Events;

            AsyncTestHelper.WaitForCondition(() => !_uut.IsBusy);
            _confirmationRequestHelper = _uut.ConfirmationRequest.NewTestHelper();
        }