public void Start_ThrowsException_IfNoTasksHaveBeenAdded() { var continuousProcess = new ContinuousProcess(4, TimeSpan.FromSeconds(1), Guid.NewGuid()); var mockExceptionPublisher = new Mock<IExceptionPublisher>(); continuousProcess.ExceptionPublisher = mockExceptionPublisher.Object; continuousProcess.Start(); mockExceptionPublisher.Verify(p => p.Publish(It.IsAny<Exception>())); }