diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-11-04 23:41:58 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-11-04 23:41:58 -0500 |
commit | 0717f926d879881e1f510a34942163bf275807dd (patch) | |
tree | 7f853b9cafbfd459bb3c7133aa94ad370c87eb7e /src | |
parent | 9e0213e7dc220ad4d738a3bfa4e23c1b7d0664ea (diff) | |
download | SMAPI-0717f926d879881e1f510a34942163bf275807dd.tar.gz SMAPI-0717f926d879881e1f510a34942163bf275807dd.tar.bz2 SMAPI-0717f926d879881e1f510a34942163bf275807dd.zip |
fix unit tests
Diffstat (limited to 'src')
-rw-r--r-- | src/SMAPI.Tests/Core/ModResolverTests.cs | 1 | ||||
-rw-r--r-- | src/SMAPI/Framework/ModLoading/ModResolver.cs | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/SMAPI.Tests/Core/ModResolverTests.cs b/src/SMAPI.Tests/Core/ModResolverTests.cs index a38621f8..51b839df 100644 --- a/src/SMAPI.Tests/Core/ModResolverTests.cs +++ b/src/SMAPI.Tests/Core/ModResolverTests.cs @@ -513,6 +513,7 @@ namespace StardewModdingAPI.Tests.Core mod.Setup(p => p.Status).Returns(ModMetadataStatus.Found); mod.Setup(p => p.DisplayName).Returns(manifest.UniqueID); mod.Setup(p => p.Manifest).Returns(manifest); + mod.Setup(p => p.HasID(It.IsAny<string>())).Returns((string id) => manifest.UniqueID == id); if (allowStatusChange) { mod diff --git a/src/SMAPI/Framework/ModLoading/ModResolver.cs b/src/SMAPI/Framework/ModLoading/ModResolver.cs index 3ff70d64..0264f61f 100644 --- a/src/SMAPI/Framework/ModLoading/ModResolver.cs +++ b/src/SMAPI/Framework/ModLoading/ModResolver.cs @@ -42,7 +42,9 @@ namespace StardewModdingAPI.Framework.ModLoading ? ModMetadataStatus.Found : ModMetadataStatus.Failed; string relativePath = PathUtilities.GetRelativePath(rootPath, folder.Directory.FullName); - yield return new ModMetadata(folder.DisplayName, folder.Directory.FullName, relativePath, manifest, dataRecord, isIgnored: !folder.ShouldBeLoaded).SetStatus(status, folder.ManifestParseError ?? "disabled by dot convention"); + + yield return new ModMetadata(folder.DisplayName, folder.Directory.FullName, relativePath, manifest, dataRecord, isIgnored: !folder.ShouldBeLoaded) + .SetStatus(status, !folder.ShouldBeLoaded ? "disabled by dot convention" : folder.ManifestParseError); } } |