From 17d35683db9fe9df15254dbcb11f05be76316e64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Breu=C3=9F=20Valentin?= Date: Thu, 1 Oct 2026 08:34:01 +0200 Subject: [PATCH] chore: update Meziantou.Analyzer to 3.0.290 Suppress the new MA0054 warning where the mocks deliberately rethrow `UnauthorizedAccessException` as an `IOException` without an inner exception, to keep the mock behavior unchanged. --- Directory.Packages.props | 2 +- .../FileSystem/DirectoryInfoMock.cs | 2 ++ .../Testably.Abstractions.Testing/FileSystem/DirectoryMock.cs | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 9988cf00..f37bfc67 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -59,6 +59,6 @@ - + diff --git a/Source/Testably.Abstractions.Testing/FileSystem/DirectoryInfoMock.cs b/Source/Testably.Abstractions.Testing/FileSystem/DirectoryInfoMock.cs index 35b13131..c93adc33 100644 --- a/Source/Testably.Abstractions.Testing/FileSystem/DirectoryInfoMock.cs +++ b/Source/Testably.Abstractions.Testing/FileSystem/DirectoryInfoMock.cs @@ -497,7 +497,9 @@ private void DeleteInternal(bool recursive) } catch (UnauthorizedAccessException ex) { +#pragma warning disable MA0054 // Embed the caught exception as innerException throw new IOException(ex.Message); +#pragma warning restore MA0054 } } } diff --git a/Source/Testably.Abstractions.Testing/FileSystem/DirectoryMock.cs b/Source/Testably.Abstractions.Testing/FileSystem/DirectoryMock.cs index 351641e8..8d2fec5d 100644 --- a/Source/Testably.Abstractions.Testing/FileSystem/DirectoryMock.cs +++ b/Source/Testably.Abstractions.Testing/FileSystem/DirectoryMock.cs @@ -117,7 +117,9 @@ public void Delete(string path) } catch (UnauthorizedAccessException ex) { +#pragma warning disable MA0054 // Embed the caught exception as innerException throw new IOException(ex.Message); +#pragma warning restore MA0054 } }