Skip to content

Commit f2529bc

Browse files
Copilotjkotas
andcommitted
Remove redundant property wrappers and merge test cases
Co-authored-by: jkotas <[email protected]>
1 parent ae329ca commit f2529bc

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/Directory/Delete.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ public class Directory_Delete_str : FileSystemTest
1414

1515
static bool IsBindMountSupportedAndPrivilegedProcess => IsBindMountSupported && PlatformDetection.IsPrivilegedProcess;
1616

17-
static bool IsRemoteExecutorSupportedAndUsingNewNormalization => RemoteExecutor.IsSupported;
18-
19-
static bool IsRemoteExecutorSupportedAndLongPathsAreNotBlockedAndUsingNewNormalization => RemoteExecutor.IsSupported;
20-
2117
#region Utilities
2218

2319
protected virtual void Delete(string path)
@@ -126,7 +122,7 @@ public void DeletingSymLinkDoesntDeleteTarget()
126122
Assert.False(Directory.Exists(linkPath), "linkPath should no longer exist");
127123
}
128124

129-
[ConditionalFact(nameof(IsRemoteExecutorSupportedAndUsingNewNormalization))]
125+
[ConditionalFact(nameof(RemoteExecutor.IsSupported))]
130126
public void ExtendedDirectoryWithSubdirectories()
131127
{
132128
RemoteExecutor.Invoke(() =>
@@ -139,7 +135,7 @@ public void ExtendedDirectoryWithSubdirectories()
139135
}).Dispose();
140136
}
141137

142-
[ConditionalFact(nameof(IsRemoteExecutorSupportedAndLongPathsAreNotBlockedAndUsingNewNormalization))]
138+
[ConditionalFact(nameof(RemoteExecutor.IsSupported))]
143139
public void LongPathExtendedDirectory()
144140
{
145141
RemoteExecutor.Invoke(() =>

src/libraries/System.Runtime/tests/System.Runtime.Extensions.Tests/System/IO/PathTests_Windows.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -237,21 +237,15 @@ public static void GetFullPath_ValidLegacy_ValidExtendedPaths(string path)
237237
InlineData(@"\\.\UNC\LOCALHOST\shareF\test.txt.~SS", @"\\.\UNC\LOCALHOST\shareF\test.txt.~SS"),
238238
InlineData(@"\\.\UNC\LOCALHOST\shareG", @"\\.\UNC\LOCALHOST\shareG"),
239239
InlineData(@"\\.\UNC\LOCALHOST\shareH\dir", @"\\.\UNC\LOCALHOST\shareH\dir"),
240+
InlineData(@"\\.\UNC\LOCALHOST\shareI\. ", @"\\.\UNC\LOCALHOST\shareI\"),
241+
InlineData(@"\\.\UNC\LOCALHOST\shareJ\.. ", @"\\.\UNC\LOCALHOST\shareJ\"),
240242
InlineData(@"\\.\UNC\LOCALHOST\shareK\ ", @"\\.\UNC\LOCALHOST\shareK\"),
241243
InlineData(@"\\.\UNC\LOCALHOST\ shareL\", @"\\.\UNC\LOCALHOST\ shareL\")]
242244
public void GetFullPath_UNC_Valid(string path, string expected)
243245
{
244246
Assert.Equal(expected, Path.GetFullPath(path));
245247
}
246248

247-
[Theory,
248-
InlineData(@"\\.\UNC\LOCALHOST\shareI\. ", @"\\.\UNC\LOCALHOST\shareI\"),
249-
InlineData(@"\\.\UNC\LOCALHOST\shareJ\.. ", @"\\.\UNC\LOCALHOST\shareJ\")]
250-
public static void GetFullPath_Windows_UNC_Valid_LegacyPathSupport(string path, string expected)
251-
{
252-
Assert.Equal(expected, Path.GetFullPath(path));
253-
}
254-
255249
[Fact]
256250
public static void GetFullPath_Windows_83Paths()
257251
{

0 commit comments

Comments
 (0)