Service kills other instances on start.

This commit is contained in:
kayone
2013-11-25 23:08:12 -08:00
parent 1e6817220a
commit d42a63a480
6 changed files with 54 additions and 25 deletions
@@ -34,7 +34,7 @@ namespace NzbDrone.App.Test
});
Subject.EnforceSingleInstance();
Subject.PreventStartIfAlreadyRunning();
Mocker.GetMock<IBrowserService>().Verify(c => c.LaunchWebUI(), Times.Never());
@@ -59,7 +59,7 @@ namespace NzbDrone.App.Test
Assert.Throws<TerminateApplicationException>(() => Subject.EnforceSingleInstance());
Assert.Throws<TerminateApplicationException>(() => Subject.PreventStartIfAlreadyRunning());
Mocker.GetMock<IBrowserService>().Verify(c => c.LaunchWebUI(), Times.Once());
ExceptionVerification.ExpectedWarns(1);
}
@@ -83,7 +83,7 @@ namespace NzbDrone.App.Test
Assert.Throws<TerminateApplicationException>(() => Subject.EnforceSingleInstance());
Assert.Throws<TerminateApplicationException>(() => Subject.PreventStartIfAlreadyRunning());
Mocker.GetMock<IBrowserService>().Verify(c => c.LaunchWebUI(), Times.Once());
ExceptionVerification.ExpectedWarns(1);
}