public void RefreshEvents() { var logViewModelMock = new LogViewModelMock(); _Form = new FormMainStub(); _Presenter = new FormMainPresenter(_Form, _ServiceGateway, logViewModelMock); _Form.RefreshEvents(); Assert.IsTrue(logViewModelMock.IsRefreshed); }
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(); }
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); }