Skip to content

Commit cc74292

Browse files
authored
System.Configuration.ConfigurationManager.Tests: use Assembly.Location to determine ThisApplicationPath. (#112231)
* System.Configuration.ConfigurationManager.Tests: use Assembly.Location to determine ThisApplicationPath. * Remove exePath_UserLevelNone test. This is functionally covered other tests (OpenExeConfiguration2 and OpenExeConfiguration2_ExePath_DoesNotExist) that do not rely on the test deployment.
1 parent 68a88d1 commit cc74292

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

src/libraries/System.Configuration.ConfigurationManager/tests/Mono/ConfigurationManagerTest.cs

-9
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,6 @@ public void OpenExeConfiguration2_ExePath_DoesNotExist()
131131
}
132132
}
133133

134-
[Fact]
135-
[ActiveIssue("https://github.com/dotnet/runtime/issues/21319", TargetFrameworkMonikers.NetFramework)]
136-
public void exePath_UserLevelNone()
137-
{
138-
string name = TestUtil.ThisApplicationPath;
139-
SysConfig config = ConfigurationManager.OpenExeConfiguration(name);
140-
Assert.Equal(TestUtil.ThisApplicationPath + ".config", config.FilePath);
141-
}
142-
143134
[Fact]
144135
public void exePath_UserLevelPerRoaming()
145136
{

src/libraries/System.Configuration.ConfigurationManager/tests/Mono/TestUtil.cs

-9
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,6 @@ public static void RunWithTempFiles(MyAction<string, string> action)
5454
}
5555
}
5656

57-
public static string ThisApplicationPath
58-
{
59-
get
60-
{
61-
return Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
62-
Assembly.GetEntryAssembly().ManifestModule.Name);
63-
}
64-
}
65-
6657
public static string ThisConfigFileName
6758
{
6859
get

0 commit comments

Comments
 (0)