public static bool IsNotRedHatFamily { get { throw null; } }
public static bool IsRedHatFamily6 { get { throw null; } }
public static bool IsRedHatFamily7 { get { throw null; } }
+ public static bool IsSoundPlaySupported { get { throw null; } }
public static bool IsNotRedHatFamily6 { get { throw null; } }
public static bool IsUap { get { throw null; } }
public static Version ICUVersion { get { return null; } }
public static Version OSXVersion => throw new PlatformNotSupportedException();
public static Version OpenSslVersion => throw new PlatformNotSupportedException();
public static bool IsDrawingSupported => IsNotWindowsNanoServer && IsNotWindowsServerCore;
+ public static bool IsSoundPlaySupported => IsNotWindowsNanoServer;
public static bool IsSuperUser => throw new PlatformNotSupportedException();
public static bool IsCentos6 => false;
public static bool IsOpenSUSE => false;
yield return new object[] { "ima.wav" };
}
- [Theory]
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsSoundPlaySupported))]
[MemberData(nameof(Play_String_TestData))]
[OuterLoop]
public void Load_SourceLocation_Success(string sourceLocation)
soundPlayer.Play();
}
- [Theory]
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsSoundPlaySupported))]
[MemberData(nameof(Play_String_TestData))]
[OuterLoop]
public async Task LoadAsync_SourceLocationFromNetwork_Success(string sourceLocation)
}
}
- [Theory]
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsSoundPlaySupported))]
[MemberData(nameof(Play_String_TestData))]
[OuterLoop]
public void Play_SourceLocation_Success(string sourceLocation)
soundPlayer.Load();
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsSoundPlaySupported))]
public void Play_NoSuchFile_ThrowsFileNotFoundException()
{
var soundPlayer = new SoundPlayer("noSuchFile");
Assert.Throws<FileNotFoundException>(() => soundPlayer.Play());
}
- [Theory]
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsSoundPlaySupported))]
[MemberData(nameof(Play_String_TestData))]
[OuterLoop]
public void Play_Stream_Success(string sourceLocation)
player.Play();
}
- [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsSoundPlaySupported))]
[MemberData(nameof(Play_InvalidString_TestData))]
[InlineData("http://google.com")]
public void Play_InvalidFile_ThrowsInvalidOperationException(string sourceLocation)