Skip to content

Commit 402f597

Browse files
committed
feat: removed the overload on public api
1 parent b526929 commit 402f597

8 files changed

+2
-12
lines changed

src/TestableIO.System.IO.Abstractions.TestingHelpers/MockDirectory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ public override void Move(string sourceDirName, string destDirName)
504504
var fullDestPath = mockFileDataAccessor.Path.GetFullPath(destDirName).TrimSlashes();
505505

506506
if (XFS.IsUnixPlatform() ? mockFileDataAccessor.StringOperations.Equals(fullSourcePath, fullDestPath)
507-
: mockFileDataAccessor.StringOperations.Equals(fullSourcePath, fullDestPath, StringComparison.Ordinal))
507+
: string.Equals(fullSourcePath, fullDestPath, StringComparison.Ordinal))
508508
{
509509
throw new IOException("Source and destination path must be different.");
510510
}
@@ -542,7 +542,7 @@ public override void Move(string sourceDirName, string destDirName)
542542
throw CommonExceptions.CannotCreateBecauseSameNameAlreadyExists(fullDestPath);
543543
}
544544
}
545-
else if (!mockFileDataAccessor.StringOperations.Equals(fullSourcePath, fullDestPath, StringComparison.OrdinalIgnoreCase))
545+
else if (!string.Equals(fullSourcePath, fullDestPath, StringComparison.OrdinalIgnoreCase))
546546
{
547547
// In Windows, file/dir names are case sensetive, C:\\temp\\src and C:\\temp\\SRC and treated different
548548
if (mockFileDataAccessor.Directory.Exists(fullDestPath) || mockFileDataAccessor.File.Exists(fullDestPath))

src/TestableIO.System.IO.Abstractions.TestingHelpers/StringOperations.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ public StringOperations(bool caseSensitive)
3737
/// </summary>
3838
public bool Equals(string x, string y) => string.Equals(x, y, comparison);
3939
/// <summary>
40-
/// Determines whether the given strings are equal using the given comparison type.
41-
/// </summary>
42-
public bool Equals(string x, string y, StringComparison comparison) => string.Equals(x, y, comparison);
43-
/// <summary>
4440
/// Determines whether the given characters are equal.
4541
/// </summary>
4642
public bool Equals(char x, char y) => caseSensitive ? x == y : char.ToUpper(x) == char.ToUpper(y);

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_net472.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,6 @@ namespace System.IO.Abstractions.TestingHelpers
482482
public bool EndsWith(string s, string suffix) { }
483483
public bool Equals(char x, char y) { }
484484
public bool Equals(string x, string y) { }
485-
public bool Equals(string x, string y, System.StringComparison comparison) { }
486485
public int IndexOf(string s, string substring) { }
487486
public int IndexOf(string s, string substring, int startIndex) { }
488487
public string Replace(string s, string oldValue, string newValue) { }

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_net6.0.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,6 @@ namespace System.IO.Abstractions.TestingHelpers
538538
public bool EndsWith(string s, string suffix) { }
539539
public bool Equals(char x, char y) { }
540540
public bool Equals(string x, string y) { }
541-
public bool Equals(string x, string y, System.StringComparison comparison) { }
542541
public int IndexOf(string s, string substring) { }
543542
public int IndexOf(string s, string substring, int startIndex) { }
544543
public string Replace(string s, string oldValue, string newValue) { }

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_net8.0.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,6 @@ namespace System.IO.Abstractions.TestingHelpers
563563
public bool EndsWith(string s, string suffix) { }
564564
public bool Equals(char x, char y) { }
565565
public bool Equals(string x, string y) { }
566-
public bool Equals(string x, string y, System.StringComparison comparison) { }
567566
public int IndexOf(string s, string substring) { }
568567
public int IndexOf(string s, string substring, int startIndex) { }
569568
public string Replace(string s, string oldValue, string newValue) { }

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_net9.0.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,6 @@ namespace System.IO.Abstractions.TestingHelpers
577577
public bool EndsWith(string s, string suffix) { }
578578
public bool Equals(char x, char y) { }
579579
public bool Equals(string x, string y) { }
580-
public bool Equals(string x, string y, System.StringComparison comparison) { }
581580
public int IndexOf(string s, string substring) { }
582581
public int IndexOf(string s, string substring, int startIndex) { }
583582
public string Replace(string s, string oldValue, string newValue) { }

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_netstandard2.0.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,6 @@ namespace System.IO.Abstractions.TestingHelpers
482482
public bool EndsWith(string s, string suffix) { }
483483
public bool Equals(char x, char y) { }
484484
public bool Equals(string x, string y) { }
485-
public bool Equals(string x, string y, System.StringComparison comparison) { }
486485
public int IndexOf(string s, string substring) { }
487486
public int IndexOf(string s, string substring, int startIndex) { }
488487
public string Replace(string s, string oldValue, string newValue) { }

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_netstandard2.1.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,6 @@ namespace System.IO.Abstractions.TestingHelpers
511511
public bool EndsWith(string s, string suffix) { }
512512
public bool Equals(char x, char y) { }
513513
public bool Equals(string x, string y) { }
514-
public bool Equals(string x, string y, System.StringComparison comparison) { }
515514
public int IndexOf(string s, string substring) { }
516515
public int IndexOf(string s, string substring, int startIndex) { }
517516
public string Replace(string s, string oldValue, string newValue) { }

0 commit comments

Comments
 (0)