diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-10-09 20:11:34 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-10-09 20:11:34 -0400 |
commit | 93a748996c1f728a1daafd2e69775c7eeb346b26 (patch) | |
tree | 2eeecc639014a6558e3d0f3ca41f65b429211412 /src/SMAPI.Tests | |
parent | e7d29a2f7dabde75fb1ad76af1975c9194b1b8bd (diff) | |
parent | ee77efcc976ef1a5ee64933a6174d2fac9c6d0f9 (diff) | |
download | SMAPI-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.cs | 6 | ||||
-rw-r--r-- | src/SMAPI.Tests/Utilities/SemanticVersionTests.cs | 4 |
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."); } |