public void ShouldOnlyForceBuildIfIntegrationStatusMatches()
		{
            var factory = mocks.StrictMock<ICruiseServerClientFactory>();
            mocks.ReplayAll();

			ForceBuildPublisher publisher = new ForceBuildPublisher(factory);
			publisher.IntegrationStatus = IntegrationStatus.Exception;
			publisher.Run(IntegrationResultMother.CreateFailed());

            mocks.VerifyAll();
        }
        public void ShouldReqestForceBuildOnRemoteCruiseServer()
        {
            var factory = mocks.StrictMock<ICruiseServerClientFactory>();
            var client = mocks.StrictMock<CruiseServerClientBase>();
            SetupResult.For(factory.GenerateClient("tcp://localhost:21234/CruiseManager.rem"))
                .Return(client);
            Expect.Call(() => client.ForceBuild("project", null))
                .Constraints(Rhino.Mocks.Constraints.Is.Equal("project"),
                    Rhino.Mocks.Constraints.Is.TypeOf<List<NameValuePair>>());
            mocks.ReplayAll();

            ForceBuildPublisher publisher = new ForceBuildPublisher(factory);
            publisher.Project = "project";
            publisher.ServerUri = "tcp://localhost:21234/CruiseManager.rem";
            publisher.Run(IntegrationResultMother.CreateSuccessful());

            mocks.VerifyAll();
        }