public void StartAndAbortExtensions() { List <ExtensionConfiguration> extensions = new List <ExtensionConfiguration>(); ExtensionConfiguration extensionStub = new ExtensionConfiguration(); extensionStub.Type = "ThoughtWorks.CruiseControl.UnitTests.Remote.ServerExtensionStub,ThoughtWorks.CruiseControl.UnitTests"; extensions.Add(extensionStub); configServiceMock.Setup(service => service.Load()).Returns(configuration).Verifiable(); projectIntegratorListFactoryMock.Setup(factory => factory.CreateProjectIntegrators(configuration.Projects, It.IsAny <IntegrationQueueSet>())) .Returns(integratorList).Verifiable(); server = new CruiseServer((IConfigurationService)configServiceMock.Object, (IProjectIntegratorListFactory)projectIntegratorListFactoryMock.Object, (IProjectSerializer)projectSerializerMock.Object, (IProjectStateManager)stateManagerMock.Object, fileSystem, executionEnvironment, extensions); Assert.IsTrue(ServerExtensionStub.HasInitialised); server.Start(); Assert.IsTrue(ServerExtensionStub.HasStarted); server.Abort(); Assert.IsTrue(ServerExtensionStub.HasAborted); }
public void StartAndAbortExtensions() { List <ExtensionConfiguration> extensions = new List <ExtensionConfiguration>(); ExtensionConfiguration extensionStub = new ExtensionConfiguration(); extensionStub.Type = "ThoughtWorks.CruiseControl.UnitTests.Remote.ServerExtensionStub,ThoughtWorks.CruiseControl.UnitTests"; extensions.Add(extensionStub); configServiceMock.ExpectAndReturn("Load", configuration); projectIntegratorListFactoryMock.ExpectAndReturn("CreateProjectIntegrators", integratorList, configuration.Projects, integrationQueue); server = new CruiseServer((IConfigurationService)configServiceMock.MockInstance, (IProjectIntegratorListFactory)projectIntegratorListFactoryMock.MockInstance, (IProjectSerializer)projectSerializerMock.MockInstance, (IProjectStateManager)stateManagerMock.MockInstance, fileSystem, executionEnvironment, extensions); Assert.IsTrue(ServerExtensionStub.HasInitialised); server.Start(); Assert.IsTrue(ServerExtensionStub.HasStarted); server.Abort(); Assert.IsTrue(ServerExtensionStub.HasAborted); }
public void StartAllProjectsInCruiseServer() { integratorMock1.Setup(integrator => integrator.Start()).Verifiable(); integratorMock2.Setup(integrator => integrator.Start()).Verifiable(); server.Start(); VerifyAll(); }
public void StartAllProjectsInCruiseServer() { integratorMock1.Expect("Start"); integratorMock2.Expect("Start"); server.Start(); VerifyAll(); }