diff options
author | Tarek Mahmoud Sayed <tarekms@microsoft.com> | 2017-08-11 08:37:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-11 08:37:36 +0300 |
commit | 878e2fcf5a9f1068015e5fada9231088663e3490 (patch) | |
tree | c3706a2fd1289b77816f353f24fa312c358f54fe /src/System.Runtime.Extensions | |
parent | 1fe52f7ff4e29462f75da9ae1c35d9789ad13709 (diff) |
Moving PlatformDetection to Corefx.Private.TestUtilities assembly (#23109)
* Moving PlatformDetection to Corefx.Private.TestUtilities assembly
The purpose of this change is to clean up all test projects instead of including the PlatformDetection code inside every test project, we’ll have it in the Corefx.Private.TestUtilities.
I have refactored the PlatformDetection to split the different implementation of Windows and Linux. If we need to do more refactoring there we can do it later as needed.
* Fix Linux BB
* Update the xunit package reference
* Fix wrong condition on one of the tests
* Update the ConditionalFact/Theory to use Type as a parameter
Diffstat (limited to 'src/System.Runtime.Extensions')
-rw-r--r-- | src/System.Runtime.Extensions/tests/System.Runtime.Extensions.Tests.csproj | 3 | ||||
-rw-r--r-- | src/System.Runtime.Extensions/tests/System/EnvironmentTests.cs | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/System.Runtime.Extensions/tests/System.Runtime.Extensions.Tests.csproj b/src/System.Runtime.Extensions/tests/System.Runtime.Extensions.Tests.csproj index 95b1a00b51..edb1d4ee6b 100644 --- a/src/System.Runtime.Extensions/tests/System.Runtime.Extensions.Tests.csproj +++ b/src/System.Runtime.Extensions/tests/System.Runtime.Extensions.Tests.csproj @@ -94,9 +94,6 @@ <Compile Include="$(CommonTestPath)\System\ShouldNotBeInvokedException.cs"> <Link>Common\System\ShouldNotBeInvokedException.cs</Link> </Compile> - <Compile Include="$(CommonTestPath)\System\PlatformDetection.cs"> - <Link>Common\System\PlatformDetection.cs</Link> - </Compile> </ItemGroup> <ItemGroup> <ProjectReference Include="$(CommonTestPath)\System\Diagnostics\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj"> diff --git a/src/System.Runtime.Extensions/tests/System/EnvironmentTests.cs b/src/System.Runtime.Extensions/tests/System/EnvironmentTests.cs index e7ef1651e9..7b7e555020 100644 --- a/src/System.Runtime.Extensions/tests/System/EnvironmentTests.cs +++ b/src/System.Runtime.Extensions/tests/System/EnvironmentTests.cs @@ -275,7 +275,7 @@ namespace System.Tests } // Requires recent RS3 builds - [ConditionalTheory(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsWindows10Version16251OrGreater))] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsWindows10Version16251OrGreater))] [SkipOnTargetFramework(~(TargetFrameworkMonikers.Uap | TargetFrameworkMonikers.UapAot))] [InlineData(Environment.SpecialFolder.LocalApplicationData)] [InlineData(Environment.SpecialFolder.Cookies)] @@ -292,7 +292,7 @@ namespace System.Tests } // Requires recent RS3 builds - [ConditionalTheory(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsWindows10Version16251OrGreater))] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsWindows10Version16251OrGreater))] [SkipOnTargetFramework(~(TargetFrameworkMonikers.Uap | TargetFrameworkMonikers.UapAot))] [InlineData(Environment.SpecialFolder.ApplicationData)] [InlineData(Environment.SpecialFolder.MyMusic)] @@ -335,7 +335,7 @@ namespace System.Tests } // The commented out folders aren't set on all systems. - [ConditionalTheory(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsNanoServer))] // https://github.com/dotnet/corefx/issues/19110 + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // https://github.com/dotnet/corefx/issues/19110 [InlineData(Environment.SpecialFolder.ApplicationData)] [InlineData(Environment.SpecialFolder.CommonApplicationData)] [InlineData(Environment.SpecialFolder.LocalApplicationData)] |