mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-16 06:20:34 +00:00
Misc test improvements
This commit is contained in:
@@ -106,7 +106,7 @@ internal sealed class Bot {
|
||||
CreateCard(2, realAppID: appID)
|
||||
];
|
||||
|
||||
Assert.ThrowsException<ArgumentOutOfRangeException>(() => GetItemsForFullBadge(items, 2, appID, MinCardsPerBadge - 1));
|
||||
Assert.ThrowsExactly<ArgumentOutOfRangeException>(() => GetItemsForFullBadge(items, 2, appID, MinCardsPerBadge - 1));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
@@ -512,7 +512,7 @@ internal sealed class Bot {
|
||||
CreateCard(4, realAppID: appID0)
|
||||
];
|
||||
|
||||
Assert.ThrowsException<InvalidOperationException>(
|
||||
Assert.ThrowsExactly<InvalidOperationException>(
|
||||
() => GetItemsForFullBadge(
|
||||
items, new Dictionary<uint, byte> {
|
||||
{ appID0, 3 },
|
||||
|
||||
@@ -320,7 +320,7 @@ internal sealed class SteamChatMessage {
|
||||
|
||||
const string message = "asdf";
|
||||
|
||||
await Assert.ThrowsExceptionAsync<ArgumentOutOfRangeException>(async () => await GetMessageParts(message, prefix).ToListAsync().ConfigureAwait(false)).ConfigureAwait(false);
|
||||
await Assert.ThrowsExactlyAsync<ArgumentOutOfRangeException>(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<ArgumentOutOfRangeException>(async () => await GetMessageParts(message, prefix).ToListAsync().ConfigureAwait(false)).ConfigureAwait(false);
|
||||
await Assert.ThrowsExactlyAsync<ArgumentOutOfRangeException>(async () => await GetMessageParts(message, prefix).ToListAsync().ConfigureAwait(false)).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
#pragma warning restore CA1812 // False positive, the class is used during MSTest
|
||||
|
||||
Reference in New Issue
Block a user