コード例 #1
0
        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");
        }
コード例 #2
0
ファイル: FormMainStub.cs プロジェクト: y11en/FileWall
        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);
        }
コード例 #3
0
ファイル: MainViewStub.cs プロジェクト: y11en/FileWall
        public void ShowEvents_RaisesEvent()
        {
            var mainView = new MainViewStub();

            AdvAssert.Raises <EventArgs>(() => mainView.ShowEvents(), mainView, "ShowEventsClicked");
        }
コード例 #4
0
ファイル: MainViewStub.cs プロジェクト: y11en/FileWall
        public void StartStop_RaisesEvent()
        {
            var mainView = new MainViewStub();

            AdvAssert.Raises <EventArgs>(() => mainView.StartStop(), mainView, "StartStopClicked");
        }
コード例 #5
0
ファイル: TestServiceGateway.cs プロジェクト: y11en/FileWall
        public void Stop_RaisesStopped()
        {
            _ServiceGateway.Start();

            AdvAssert.Raises <EventArgs>(() => _ServiceGateway.Stop(), _ServiceGateway, "Stopped");
        }