diff --git a/ArchiSteamFarm.Tests/Bot.cs b/ArchiSteamFarm.Tests/Bot.cs index 59e654ca1..8b72ec8c5 100644 --- a/ArchiSteamFarm.Tests/Bot.cs +++ b/ArchiSteamFarm.Tests/Bot.cs @@ -106,7 +106,7 @@ internal sealed class Bot { CreateCard(2, realAppID: appID) ]; - Assert.ThrowsException(() => GetItemsForFullBadge(items, 2, appID, MinCardsPerBadge - 1)); + Assert.ThrowsExactly(() => GetItemsForFullBadge(items, 2, appID, MinCardsPerBadge - 1)); } [TestMethod] @@ -512,7 +512,7 @@ internal sealed class Bot { CreateCard(4, realAppID: appID0) ]; - Assert.ThrowsException( + Assert.ThrowsExactly( () => GetItemsForFullBadge( items, new Dictionary { { appID0, 3 }, diff --git a/ArchiSteamFarm.Tests/SteamChatMessage.cs b/ArchiSteamFarm.Tests/SteamChatMessage.cs index 2224d3532..798af1cd9 100644 --- a/ArchiSteamFarm.Tests/SteamChatMessage.cs +++ b/ArchiSteamFarm.Tests/SteamChatMessage.cs @@ -320,7 +320,7 @@ internal sealed class SteamChatMessage { const string message = "asdf"; - await Assert.ThrowsExceptionAsync(async () => await GetMessageParts(message, prefix).ToListAsync().ConfigureAwait(false)).ConfigureAwait(false); + await Assert.ThrowsExactlyAsync(async () => await GetMessageParts(message, prefix).ToListAsync().ConfigureAwait(false)).ConfigureAwait(false); } [TestMethod] @@ -329,7 +329,7 @@ internal sealed class SteamChatMessage { const string message = "asdf"; - await Assert.ThrowsExceptionAsync(async () => await GetMessageParts(message, prefix).ToListAsync().ConfigureAwait(false)).ConfigureAwait(false); + await Assert.ThrowsExactlyAsync(async () => await GetMessageParts(message, prefix).ToListAsync().ConfigureAwait(false)).ConfigureAwait(false); } } #pragma warning restore CA1812 // False positive, the class is used during MSTest