1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-26 01:27:00 +00:00

ignore WindowsService tests in *nix systems.

This commit is contained in:
kay.one 2013-02-17 20:13:23 -08:00
parent 3cf527bfa2
commit a4ee4a913f
2 changed files with 14 additions and 0 deletions

View file

@ -18,6 +18,11 @@ public class ServiceProviderTests : TestBase
[SetUp]
public void Setup()
{
if(EnvironmentProvider.IsLinux)
{
throw new IgnoreException("Windows services aren't available in none-windows environments.");
}
serviceProvider = new ServiceProvider();
if (serviceProvider.ServiceExist(TEMP_SERVICE_NAME))

View file

@ -44,6 +44,15 @@ public static bool IsMono
}
}
public static bool IsLinux
{
get
{
int p = (int)Environment.OSVersion.Platform;
return (p == 4) || (p == 6) || (p == 128);
}
}
public static bool IsDebug
{
get