summaryrefslogtreecommitdiff
path: root/src/SMAPI.Tests
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-11-30 17:12:49 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-11-30 17:12:49 -0500
commit919bbe94aa027c8a4ff8db4bdb50e8e2a28c48d9 (patch)
tree5c03ee1bd3cd658586755694940ac329491d6493 /src/SMAPI.Tests
parent3ca6fb562417748c87567d6bb6915d56b2c1b57c (diff)
parentd1d09ae1df63826dd453aa0347d668f420754ed7 (diff)
downloadSMAPI-919bbe94aa027c8a4ff8db4bdb50e8e2a28c48d9.tar.gz
SMAPI-919bbe94aa027c8a4ff8db4bdb50e8e2a28c48d9.tar.bz2
SMAPI-919bbe94aa027c8a4ff8db4bdb50e8e2a28c48d9.zip
Merge branch 'beta' into develop
Diffstat (limited to 'src/SMAPI.Tests')
-rw-r--r--src/SMAPI.Tests/SMAPI.Tests.csproj8
-rw-r--r--src/SMAPI.Tests/Utilities/PathUtilitiesTests.cs8
2 files changed, 5 insertions, 11 deletions
diff --git a/src/SMAPI.Tests/SMAPI.Tests.csproj b/src/SMAPI.Tests/SMAPI.Tests.csproj
index 8f7bfab4..8329b2e1 100644
--- a/src/SMAPI.Tests/SMAPI.Tests.csproj
+++ b/src/SMAPI.Tests/SMAPI.Tests.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<AssemblyName>SMAPI.Tests</AssemblyName>
<RootNamespace>SMAPI.Tests</RootNamespace>
- <TargetFramework>net452</TargetFramework>
+ <TargetFramework>net5.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LangVersion>latest</LangVersion>
</PropertyGroup>
@@ -16,16 +16,14 @@
</ItemGroup>
<ItemGroup>
+ <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="NUnit" Version="3.13.2" />
</ItemGroup>
<ItemGroup>
- <Reference Include="$(GameExecutableName)">
- <HintPath>$(GamePath)\$(GameExecutableName).exe</HintPath>
- <Private>True</Private>
- </Reference>
+ <Reference Include="Stardew Valley" HintPath="$(GamePath)\Stardew Valley.dll" Private="True" />
</ItemGroup>
<ItemGroup>
diff --git a/src/SMAPI.Tests/Utilities/PathUtilitiesTests.cs b/src/SMAPI.Tests/Utilities/PathUtilitiesTests.cs
index c18f47a5..ab4c2618 100644
--- a/src/SMAPI.Tests/Utilities/PathUtilitiesTests.cs
+++ b/src/SMAPI.Tests/Utilities/PathUtilitiesTests.cs
@@ -182,18 +182,14 @@ namespace SMAPI.Tests.Utilities
[TestCaseSource(nameof(PathUtilitiesTests.SamplePaths))]
public void NormalizeAssetName(SamplePath path)
{
- if (Path.IsPathRooted(path.OriginalPath) || path.OriginalPath.StartsWith("/") || path.OriginalPath.StartsWith("\\"))
+ if (Path.IsPathRooted(path.OriginalPath) || path.OriginalPath.StartsWith('/') || path.OriginalPath.StartsWith('\\'))
Assert.Ignore("Absolute paths can't be used as asset names.");
// act
string normalized = PathUtilities.NormalizeAssetName(path.OriginalPath);
// assert
-#if SMAPI_FOR_WINDOWS
- Assert.AreEqual(path.NormalizedOnWindows, normalized);
-#else
- Assert.AreEqual(path.NormalizedOnUnix, normalized);
-#endif
+ Assert.AreEqual(path.NormalizedOnUnix, normalized); // MonoGame uses the Linux format
}
/****