public void StartAndAbortDoesNothing() { var extension = new IntegrationRequestThrottleExtension(); var serverMock = this.mocks.Create <ICruiseServer>(MockBehavior.Strict).Object; var config = new ExtensionConfiguration(); Mock.Get(serverMock).SetupAdd(_serverMock => _serverMock.IntegrationCompleted += It.IsAny <EventHandler <IntegrationCompletedEventArgs> >()).Verifiable(); Mock.Get(serverMock).SetupAdd(_serverMock => _serverMock.IntegrationStarted += It.IsAny <EventHandler <IntegrationStartedEventArgs> >()).Verifiable(); extension.Initialise(serverMock, config); extension.Start(); extension.Abort(); mocks.VerifyAll(); }
public void StartAndAbortDoesNothing() { var extension = new IntegrationRequestThrottleExtension(); var serverMock = this.mocks.StrictMock <ICruiseServer>(); var config = new ExtensionConfiguration(); Expect.Call(() => serverMock.IntegrationCompleted += null).IgnoreArguments(); Expect.Call(() => serverMock.IntegrationStarted += null).IgnoreArguments(); this.mocks.ReplayAll(); extension.Initialise(serverMock, config); extension.Start(); extension.Abort(); this.mocks.VerifyAll(); }