Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
feat: removed the overload on public api
  • Loading branch information
oni-shiro committed Apr 16, 2025
commit 402f597001ec71a69b1dc401ec84996bf63d01c0
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ public override void Move(string sourceDirName, string destDirName)
var fullDestPath = mockFileDataAccessor.Path.GetFullPath(destDirName).TrimSlashes();

if (XFS.IsUnixPlatform() ? mockFileDataAccessor.StringOperations.Equals(fullSourcePath, fullDestPath)
: mockFileDataAccessor.StringOperations.Equals(fullSourcePath, fullDestPath, StringComparison.Ordinal))
: string.Equals(fullSourcePath, fullDestPath, StringComparison.Ordinal))
{
throw new IOException("Source and destination path must be different.");
}
Expand Down Expand Up @@ -542,7 +542,7 @@ public override void Move(string sourceDirName, string destDirName)
throw CommonExceptions.CannotCreateBecauseSameNameAlreadyExists(fullDestPath);
}
}
else if (!mockFileDataAccessor.StringOperations.Equals(fullSourcePath, fullDestPath, StringComparison.OrdinalIgnoreCase))
else if (!string.Equals(fullSourcePath, fullDestPath, StringComparison.OrdinalIgnoreCase))
{
// In Windows, file/dir names are case sensetive, C:\\temp\\src and C:\\temp\\SRC and treated different
if (mockFileDataAccessor.Directory.Exists(fullDestPath) || mockFileDataAccessor.File.Exists(fullDestPath))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ public StringOperations(bool caseSensitive)
/// </summary>
public bool Equals(string x, string y) => string.Equals(x, y, comparison);
/// <summary>
/// Determines whether the given strings are equal using the given comparison type.
/// </summary>
public bool Equals(string x, string y, StringComparison comparison) => string.Equals(x, y, comparison);
/// <summary>
/// Determines whether the given characters are equal.
/// </summary>
public bool Equals(char x, char y) => caseSensitive ? x == y : char.ToUpper(x) == char.ToUpper(y);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,6 @@ namespace System.IO.Abstractions.TestingHelpers
public bool EndsWith(string s, string suffix) { }
public bool Equals(char x, char y) { }
public bool Equals(string x, string y) { }
public bool Equals(string x, string y, System.StringComparison comparison) { }
public int IndexOf(string s, string substring) { }
public int IndexOf(string s, string substring, int startIndex) { }
public string Replace(string s, string oldValue, string newValue) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,6 @@ namespace System.IO.Abstractions.TestingHelpers
public bool EndsWith(string s, string suffix) { }
public bool Equals(char x, char y) { }
public bool Equals(string x, string y) { }
public bool Equals(string x, string y, System.StringComparison comparison) { }
public int IndexOf(string s, string substring) { }
public int IndexOf(string s, string substring, int startIndex) { }
public string Replace(string s, string oldValue, string newValue) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,6 @@ namespace System.IO.Abstractions.TestingHelpers
public bool EndsWith(string s, string suffix) { }
public bool Equals(char x, char y) { }
public bool Equals(string x, string y) { }
public bool Equals(string x, string y, System.StringComparison comparison) { }
public int IndexOf(string s, string substring) { }
public int IndexOf(string s, string substring, int startIndex) { }
public string Replace(string s, string oldValue, string newValue) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,6 @@ namespace System.IO.Abstractions.TestingHelpers
public bool EndsWith(string s, string suffix) { }
public bool Equals(char x, char y) { }
public bool Equals(string x, string y) { }
public bool Equals(string x, string y, System.StringComparison comparison) { }
public int IndexOf(string s, string substring) { }
public int IndexOf(string s, string substring, int startIndex) { }
public string Replace(string s, string oldValue, string newValue) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,6 @@ namespace System.IO.Abstractions.TestingHelpers
public bool EndsWith(string s, string suffix) { }
public bool Equals(char x, char y) { }
public bool Equals(string x, string y) { }
public bool Equals(string x, string y, System.StringComparison comparison) { }
public int IndexOf(string s, string substring) { }
public int IndexOf(string s, string substring, int startIndex) { }
public string Replace(string s, string oldValue, string newValue) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,6 @@ namespace System.IO.Abstractions.TestingHelpers
public bool EndsWith(string s, string suffix) { }
public bool Equals(char x, char y) { }
public bool Equals(string x, string y) { }
public bool Equals(string x, string y, System.StringComparison comparison) { }
public int IndexOf(string s, string substring) { }
public int IndexOf(string s, string substring, int startIndex) { }
public string Replace(string s, string oldValue, string newValue) { }
Expand Down