diff --git a/SoundSwitch.Audio.Manager.Tests/AudioPolicyConfigTests.cs b/SoundSwitch.Audio.Manager.Tests/AudioPolicyConfigTests.cs index d994d3b508..460c406896 100644 --- a/SoundSwitch.Audio.Manager.Tests/AudioPolicyConfigTests.cs +++ b/SoundSwitch.Audio.Manager.Tests/AudioPolicyConfigTests.cs @@ -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)}"); } diff --git a/SoundSwitch.Audio.Manager/Interop/Client/Extended/Factory/AudioPolicyConfigFactory.cs b/SoundSwitch.Audio.Manager/Interop/Client/Extended/Factory/AudioPolicyConfigFactory.cs index ba01a51877..4a43ab7c78 100644 --- a/SoundSwitch.Audio.Manager/Interop/Client/Extended/Factory/AudioPolicyConfigFactory.cs +++ b/SoundSwitch.Audio.Manager/Interop/Client/Extended/Factory/AudioPolicyConfigFactory.cs @@ -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() {