Beispiel #1
0
        public void TestEventInitialization()
        {
            viewMocks.Init += null;             //also set expectation
            IEventRaiser init = LastCall.IgnoreArguments().GetEventRaiser();

            viewMocks.Load += null;             //also set expectation
            IEventRaiser load = LastCall.IgnoreArguments().GetEventRaiser();

            mocks.Replay(viewMocks);             //we move just this to replay state.
            PresenterBase <IView> presenterBase =
                mocks.StrictMock <PresenterBase <IView> >(viewMocks);

            presenterBase.Initialize();
            presenterBase.Load();
            mocks.ReplayAll();
            init.Raise(viewMocks, EventArgs.Empty);             //raise Init method
            load.Raise(viewMocks, EventArgs.Empty);             //raise Load method
        }