Skip to content

Commit 8b915e0

Browse files
committed
Fix further issues
1 parent c398a61 commit 8b915e0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Tests/Testably.Abstractions.Testing.Tests/Statistics/FileSystem/FileSystemWatcherStatisticsTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Threading.Tasks;
55
using Testably.Abstractions.Testing.Statistics;
66
using Testably.Abstractions.Testing.Tests.TestHelpers;
7+
// ReSharper disable MethodSupportsCancellation
78

89
namespace Testably.Abstractions.Testing.Tests.Statistics.FileSystem;
910

Tests/Testably.Abstractions.Tests/FileSystem/FileSystemWatcher/EventTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.IO;
33
using System.Threading;
44
using System.Threading.Tasks;
5+
// ReSharper disable MethodSupportsCancellation
56

67
namespace Testably.Abstractions.Tests.FileSystem.FileSystemWatcher;
78

@@ -50,7 +51,7 @@ void FileSystemWatcherOnChanged(object sender, FileSystemEventArgs e)
5051
while (!token.IsCancellationRequested)
5152
{
5253
string content = i++.ToString(CultureInfo.InvariantCulture);
53-
FileSystem.File.WriteAllText(path, content);
54+
await FileSystem.File.WriteAllTextAsync(path, content, token);
5455
await Task.Delay(10);
5556
ms1.Set();
5657
}
@@ -261,7 +262,7 @@ void FileSystemWatcherOnRenamed(object sender, FileSystemEventArgs e)
261262
try
262263
{
263264
int i = 0;
264-
FileSystem.File.WriteAllText($"path-{i}", "");
265+
await FileSystem.File.WriteAllTextAsync($"path-{i}", "", token);
265266
while (!token.IsCancellationRequested)
266267
{
267268
FileSystem.File.Move($"path-{i}", $"path-{++i}");

0 commit comments

Comments
 (0)