public void UninstallService_WhenMachineNameIsNullOrEmpty_ThrowsArgumentExcpetion() { var ntServiceManager = new ScExeBasedNtServiceManager("c:\\", new TimeSpan(1)); Assert.Throws <ArgumentException>(() => ntServiceManager.UninstallService(string.Empty, "serviceName")); }
public void StopService_WhenServiceNameIsNullOrEmpty_ThrowsArgumentExcpetion() { var ntServiceManager = new ScExeBasedNtServiceManager("c:\\", new TimeSpan(1)); Assert.Throws <ArgumentException>(() => ntServiceManager.StopService("machineName", string.Empty)); }
public void InstallService_WhenNtServiceDescriptorIsNull_ThrowsArgumentException() { var ntServiceManager = new ScExeBasedNtServiceManager("c:\\", new TimeSpan(1)); Assert.Throws <ArgumentNullException>(() => ntServiceManager.InstallService("machineName", null)); }