mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 18:57:39 -07:00
Unit test should now run in a machine with NzbDrone installed as a service with no side effects.
This commit is contained in:
parent
406e5e1f5e
commit
c1cf29757f
10 changed files with 51 additions and 157 deletions
|
@ -23,14 +23,14 @@ namespace NzbDrone.Update.Test
|
|||
public void should_stop_nzbdrone_service_if_installed()
|
||||
{
|
||||
mocker.GetMock<ServiceProvider>()
|
||||
.Setup(c => c.ServiceExist(ServiceProvider.NzbDroneServiceName))
|
||||
.Setup(c => c.ServiceExist(ServiceProvider.NZBDRONE_SERVICE_NAME))
|
||||
.Returns(true);
|
||||
|
||||
//Act
|
||||
mocker.Resolve<UpdateProvider>().Start(null);
|
||||
|
||||
//Assert
|
||||
mocker.GetMock<ServiceProvider>().Verify(c => c.Stop(ServiceProvider.NzbDroneServiceName), Times.Once());
|
||||
mocker.GetMock<ServiceProvider>().Verify(c => c.Stop(ServiceProvider.NZBDRONE_SERVICE_NAME), Times.Once());
|
||||
mocker.VerifyAllMocks();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue