public void ShouldContinueRunningIfNotToldToStop()
        {
            integrationTriggerMock.SetupResultAndSignal("Fire", null);
            projectMock.ExpectNoCall("Integrate", typeof(IntegrationRequest));
            integrationTriggerMock.ExpectNoCall("IntegrationCompleted");

            integrator.Start();
            integrationTriggerMock.WaitForSignal();
            Assert.AreEqual(ProjectIntegratorState.Running, integrator.State);
            VerifyAll();
        }
Exemple #2
0
        public void ShouldContinueRunningIfNotToldToStop()
        {
            LatchHelper latchHelper = new LatchHelper();

            integrationTriggerMock.Setup(_trigger => _trigger.Fire()).Callback(() => latchHelper.SetLatch()).Returns(() => null);

            integrator.Start();
            latchHelper.WaitForSignal();
            Assert.AreEqual(ProjectIntegratorState.Running, integrator.State);
            projectMock.Verify(project => project.Integrate(It.IsAny <IntegrationRequest>()), Times.Never);
            integrationTriggerMock.Verify(_trigger => _trigger.IntegrationCompleted(), Times.Never);
            VerifyAll();
        }