public void ShowEventsClicked_Redirected() { var mainView = new MainViewStub(); var presenter = new MainViewPresenter(new ServiceGateway(new AdvSCStub(), new ServiceInterfaceManagerStub())) { MainView = mainView }; AdvAssert.Raises <EventArgs>(() => mainView.ShowEvents(), presenter, "ShowEventsClicked"); }
public void TestEventInvokators() { var stub = new FormMainStub(); AdvAssert.Raises <EventArgs>(() => stub.ShowMain(), stub, "ShowMainClicked"); AdvAssert.Raises <EventArgs>(() => stub.ShowRules(), stub, "ShowRulesClicked"); AdvAssert.Raises <EventArgs>(() => stub.ShowPreferences(), stub, "ShowPreferencesClicked"); AdvAssert.Raises <EventArgs>(() => stub.ShowEvents(), stub, "ShowEventsClicked"); AdvAssert.Raises <EventArgs>(() => stub.CloseAll(), stub, "CloseAllClicked"); AdvAssert.Raises <EventArgs>(() => stub.RefreshRules(), stub, "RefreshRulesClicked"); AdvAssert.Raises <EventArgs>(() => stub.RefreshEvents(), stub, "RefreshEventsClicked"); AdvAssert.Raises <EventArgs>(() => stub.ExitAndShutDown(), stub, "ExitAndShutDownClicked"); AdvAssert.Raises <EventArgs>(() => stub.ClearEvents(), stub, "ClearEventsClicked"); AdvAssert.Raises <EventArgs>(() => stub.ShowEventDetails(), stub, "ShowEventDetailsClicked"); AdvAssert.Raises <ExportEventsEventArgs>(() => stub.ExportEvents(), stub, "ExportEventsClicked"); AdvAssert.Raises <EventArgs>(() => stub.AutoRefreshEventsSetCheck(true), stub, "AutoRefreshEventsCheckChanged"); Assert.IsTrue(stub.AutoRefreshEvents); }
public void ShowEvents_RaisesEvent() { var mainView = new MainViewStub(); AdvAssert.Raises <EventArgs>(() => mainView.ShowEvents(), mainView, "ShowEventsClicked"); }
public void StartStop_RaisesEvent() { var mainView = new MainViewStub(); AdvAssert.Raises <EventArgs>(() => mainView.StartStop(), mainView, "StartStopClicked"); }
public void Stop_RaisesStopped() { _ServiceGateway.Start(); AdvAssert.Raises <EventArgs>(() => _ServiceGateway.Stop(), _ServiceGateway, "Stopped"); }