Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix System.Configuration.ConfigurationManager.Tests on Android and reenable on non-Windows platforms #56558

Merged
merged 1 commit into from
Jul 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
using System;
using Xunit;

[assembly: CollectionBehavior(DisableTestParallelization = true, MaxParallelThreads = 1)]

[assembly: SkipOnPlatform(TestPlatforms.Browser, "System.Configuration.ConfigurationManager is not supported on Browser")]
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- XUnit AppDomains BaseDirectory path doesn't contain a trailing slash, which impacts our tests. -->
<TestDisableAppDomain>true</TestDisableAppDomain>
<TestDisableParallelization>true</TestDisableParallelization>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;net461</TargetFrameworks>
<TargetFrameworks>$(NetCoreAppCurrent);net461</TargetFrameworks>
<IgnoreForCI Condition="'$(TargetOS)' == 'Browser'">true</IgnoreForCI>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public void GetDirectoryOrRootName_GettingDirectoryFromAFilePath()
// Remove the trailing slash. Different OS's use a different slash.
// This is to make the test pass without worrying about adding a slash
// and which kind of slash.
string exePathWithoutTrailingSlash = exePath.Substring(0, exePath.Length - 1);
string pathToNonexistentFile = exePath + "TestFileForUrlPathTests.txt";
string exePathWithoutTrailingSlash = exePath.TrimEnd(Path.DirectorySeparatorChar);
string pathToNonexistentFile = Path.Combine(exePath, "TestFileForUrlPathTests.txt");

string test = UrlPath.GetDirectoryOrRootName(pathToNonexistentFile);
Assert.Equal(exePathWithoutTrailingSlash, test);
Expand Down