1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-04 17:43:17 +00:00

PM-3350 PM-3349 Updated Unit Test projects to NET 8.0 and fixed it to work with Core project reference. Also fixed a test that was breaking due to CIpherKey creation being wrong. Added "UT" as a constant to add when building/running Core.Test project so we have something on the context that tells us that is for a UT. With this I had to remove FFImageLoading on UT context because it doesn't support NET 8.0

This commit is contained in:
Federico Maccaroni
2024-01-15 17:18:51 -03:00
parent 1949a450fd
commit 6d625f285b
12 changed files with 142 additions and 15 deletions

View File

@@ -1,12 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFrameworks>net8.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<RootNamespace>Bit.Core.Test</RootNamespace>
<!-- Uncomment this to load the referenced projects into this one. I've added the restriction so it doesn't mess up with the restore.
This is useful when working with the test project.
<CustomConstants>UT</CustomConstants>
-->
</PropertyGroup>
<ItemGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>TRACE;DEBUG;NET;NET8_0;NETCOREAPP</DefineConstants>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.0" />
<PackageReference Include="NSubstitute" Version="5.0.0" />
<PackageReference Include="xunit" Version="2.5.0" />
@@ -19,8 +28,8 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Core\Core.csproj" />
<ProjectReference Include="..\common\Common.csproj" />
<ProjectReference Condition="$(CustomConstants.Contains(UT))" Include="..\..\src\Core\Core.csproj" />
<ProjectReference Condition="$(CustomConstants.Contains(UT))" Include="..\common\Common.csproj" />
</ItemGroup>
</Project>