1
1
using System ;
2
- using System . IO ;
3
2
using Testably . Abstractions . Testing . Helpers ;
4
3
5
4
namespace Testably . Abstractions . Testing . Storage ;
@@ -83,8 +82,8 @@ public override int GetHashCode()
83
82
/// <inheritdoc cref="IStorageLocation.GetParent()" />
84
83
public IStorageLocation ? GetParent ( )
85
84
{
86
- string ? parentPath = Path . GetDirectoryName ( FullPath ) ;
87
- if ( Path . GetPathRoot ( FullPath ) == FullPath || parentPath == null )
85
+ string ? parentPath = _fileSystem . Path . GetDirectoryName ( FullPath ) ;
86
+ if ( _fileSystem . Path . GetPathRoot ( FullPath ) == FullPath || parentPath == null )
88
87
{
89
88
return null ;
90
89
}
@@ -98,7 +97,7 @@ public override int GetHashCode()
98
97
99
98
private string GetFriendlyNameParent ( string parentPath )
100
99
=> _fileSystem . Execute . OnNetFramework (
101
- ( ) => Path . GetFileName ( parentPath ) ,
100
+ ( ) => _fileSystem . Path . GetFileName ( parentPath ) ,
102
101
( ) => parentPath ) ;
103
102
104
103
#endregion
@@ -133,13 +132,13 @@ public override string ToString()
133
132
private static string NormalizeKey ( MockFileSystem fileSystem , string fullPath )
134
133
{
135
134
#if FEATURE_PATH_ADVANCED
136
- return Path . TrimEndingDirectorySeparator ( fullPath ) ;
135
+ return fileSystem . Path . TrimEndingDirectorySeparator ( fullPath ) ;
137
136
#else
138
137
return FileFeatureExtensionMethods . TrimEndingDirectorySeparator (
139
138
fileSystem ,
140
139
fullPath ,
141
- Path . DirectorySeparatorChar ,
142
- Path . AltDirectorySeparatorChar ) ;
140
+ fileSystem . Path . DirectorySeparatorChar ,
141
+ fileSystem . Path . AltDirectorySeparatorChar ) ;
143
142
#endif
144
143
}
145
144
}
0 commit comments