fixed NzbDrone using 100% cpu when console not available.

This commit is contained in:
Keivan Beigi 2013-08-20 15:12:35 -07:00
commit 75a46a3abe
9 changed files with 39 additions and 31 deletions

View file

@ -50,11 +50,9 @@ namespace NzbDrone.App.Test
public void Route_should_call_console_service_when_application_mode_is_console()
{
Mocker.GetMock<IRuntimeInfo>().SetupGet(c => c.IsUserInteractive).Returns(true);
Mocker.GetMock<IConsoleService>().SetupGet(c => c.IsConsoleApplication).Returns(true);
Subject.Route(ApplicationModes.Interactive);
Mocker.GetMock<IConsoleService>().Verify(c => c.WaitForClose(), Times.Once());
Mocker.GetMock<INzbDroneServiceFactory>().Verify(c => c.Start(), Times.Once());
}