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