summaryrefslogtreecommitdiff
path: root/src/SMAPI.Tests
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-10-09 20:11:34 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-10-09 20:11:34 -0400
commit93a748996c1f728a1daafd2e69775c7eeb346b26 (patch)
tree2eeecc639014a6558e3d0f3ca41f65b429211412 /src/SMAPI.Tests
parente7d29a2f7dabde75fb1ad76af1975c9194b1b8bd (diff)
parentee77efcc976ef1a5ee64933a6174d2fac9c6d0f9 (diff)
downloadSMAPI-93a748996c1f728a1daafd2e69775c7eeb346b26.tar.gz
SMAPI-93a748996c1f728a1daafd2e69775c7eeb346b26.tar.bz2
SMAPI-93a748996c1f728a1daafd2e69775c7eeb346b26.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Tests')
-rw-r--r--src/SMAPI.Tests/Utilities/KeybindListTests.cs6
-rw-r--r--src/SMAPI.Tests/Utilities/SemanticVersionTests.cs4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/SMAPI.Tests/Utilities/KeybindListTests.cs b/src/SMAPI.Tests/Utilities/KeybindListTests.cs
index c4c086de..c5fd5daf 100644
--- a/src/SMAPI.Tests/Utilities/KeybindListTests.cs
+++ b/src/SMAPI.Tests/Utilities/KeybindListTests.cs
@@ -136,11 +136,11 @@ namespace SMAPI.Tests.Utilities
foreach (string rawPair in stateMap.Split(','))
{
// parse values
- string[] parts = rawPair.Split(new[] { ':' }, 2);
+ string[] parts = rawPair.Split(':', 2, StringSplitOptions.TrimEntries);
if (!Enum.TryParse(parts[0], ignoreCase: true, out SButton curButton))
- Assert.Fail($"The state map is invalid: unknown button value '{parts[0].Trim()}'");
+ Assert.Fail($"The state map is invalid: unknown button value '{parts[0]}'");
if (!Enum.TryParse(parts[1], ignoreCase: true, out SButtonState state))
- Assert.Fail($"The state map is invalid: unknown state value '{parts[1].Trim()}'");
+ Assert.Fail($"The state map is invalid: unknown state value '{parts[1]}'");
// get state
if (curButton == button)
diff --git a/src/SMAPI.Tests/Utilities/SemanticVersionTests.cs b/src/SMAPI.Tests/Utilities/SemanticVersionTests.cs
index fedadba6..77c0da5f 100644
--- a/src/SMAPI.Tests/Utilities/SemanticVersionTests.cs
+++ b/src/SMAPI.Tests/Utilities/SemanticVersionTests.cs
@@ -382,11 +382,11 @@ namespace SMAPI.Tests.Utilities
{
// act
string json = JsonConvert.SerializeObject(new SemanticVersion(versionStr));
- SemanticVersion after = JsonConvert.DeserializeObject<SemanticVersion>(json);
+ SemanticVersion? after = JsonConvert.DeserializeObject<SemanticVersion>(json);
// assert
Assert.IsNotNull(after, "The semantic version after deserialization is unexpectedly null.");
- Assert.AreEqual(versionStr, after.ToString(), "The semantic version after deserialization doesn't match the input version.");
+ Assert.AreEqual(versionStr, after!.ToString(), "The semantic version after deserialization doesn't match the input version.");
}