Exemplo n.º 1
0
        public void RefreshEvents()
        {
            var logViewModelMock = new LogViewModelMock();

            _Form      = new FormMainStub();
            _Presenter = new FormMainPresenter(_Form, _ServiceGateway, logViewModelMock);

            _Form.RefreshEvents();

            Assert.IsTrue(logViewModelMock.IsRefreshed);
        }
Exemplo n.º 2
0
        public void TestInitialize()
        {
            _Form             = new FormMainStub();
            _InterfaceManager = new ServiceInterfaceManagerStub();

            // Redirect all calls to AdvSCStub and ServiceInterfaceManagerStub to avoid creating accessing system resources.
            _ServiceGateway = new ServiceGateway(new AdvSCStub(), _InterfaceManager);

            _LogViewModel = new LogViewModelMock();
            _Presenter    = new FormMainPresenter(_Form, _ServiceGateway, _LogViewModel);

            _ServiceGateway.Start();
        }
Exemplo n.º 3
0
        public void ShowEvents()
        {
            var logViewModelMock = new LogViewModelMock();

            _Form      = new FormMainStub();
            _Presenter = new FormMainPresenter(_Form, _ServiceGateway, logViewModelMock);

            _Form.ShowEvents();

            Assert.IsTrue(_Form.DisplayedControl is LogViewControl);
            Assert.IsTrue(((Control)_Form.DisplayedControl).Dock == DockStyle.Fill);
            Assert.AreSame(_Form.DisplayedControl, _Presenter.LogViewPresenter.LogView);

            AssertEventsRibbonVisible(true);
            Assert.IsTrue(logViewModelMock.IsRefreshed);
        }