Пример #1
0
        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);
        }
Пример #2
0
        public void ExitAndShutdown()
        {
            _Form.ExitAndShutDown();

            Assert.IsFalse(_ServiceGateway.IsStarted);
        }