Skip to content

Commit

Permalink
add build check to test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ephemerality committed Dec 20, 2021
1 parent 390fc80 commit 5bce7e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions SoundSwitch.Audio.Manager.Tests/AudioPolicyConfigTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public void CreateAudioPolicyConfigTest()
public void UnsupportedWindowsVersionTest()
{
var audioPolicyConfig = AudioPolicyConfigFactory.Create();
if (Environment.OSVersion.Version.Major < 10)
Assert.True(audioPolicyConfig is UnsupportedAudioPolicyConfig, $"audioPolicyConfig should be {nameof(UnsupportedAudioPolicyConfig)} if not on Windows 10+");
if (Environment.OSVersion.Version.Major < 10 || Environment.OSVersion.Version.Build <= AudioPolicyConfigFactory.OS_1709_VERSION)
Assert.True(audioPolicyConfig is UnsupportedAudioPolicyConfig, $"audioPolicyConfig should be {nameof(UnsupportedAudioPolicyConfig)} if not on Windows 10 versions above 1709");
else
Assert.True(audioPolicyConfig is AudioPolicyConfig, $"audioPolicyConfig should be a valid {nameof(AudioPolicyConfig)}");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace SoundSwitch.Audio.Manager.Interop.Client.Extended.Factory
{
internal static class AudioPolicyConfigFactory
{
private const int OS_1709_VERSION = 16299;
internal const int OS_1709_VERSION = 16299;

public static IAudioPolicyConfig Create()
{
Expand Down

0 comments on commit 5bce7e9

Please sign in to comment.