public void StartAndStopDoesNothing() { var counters = this.InitialiseCounters(); var extension = new IntegrationPerformanceCountersExtension { PerformanceCounters = counters }; 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.Stop(); this.mocks.VerifyAll(); }
public void StartAndStopDoesNothing() { var counters = this.InitialiseCounters(); var extension = new IntegrationPerformanceCountersExtension { PerformanceCounters = counters }; 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.Stop(); mocks.VerifyAll(); }