Updated build target to dotnet 12. Fixed failed tests and runtime failures
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
|
||||
<PackageReference Include="NSubstitute" Version="5.1.0"/>
|
||||
<PackageReference Include="NUnit" Version="4.0.1" />
|
||||
<PackageReference Include="NUnit" Version="4.0.1"/>
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0"/>
|
||||
<PackageReference Include="NUnit.Analyzers" Version="3.10.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
|
@ -10,8 +10,7 @@ using pacMan.Services;
|
||||
|
||||
namespace BackendTests.Services;
|
||||
|
||||
[TestFixture]
|
||||
[TestOf(nameof(ActionService))]
|
||||
[TestFixture, TestOf(nameof(ActionService))]
|
||||
public class ActionServiceTests
|
||||
{
|
||||
[SetUp]
|
||||
@ -157,7 +156,7 @@ public class ActionServiceTests
|
||||
public void FindNextPlayer_NoPlayers()
|
||||
{
|
||||
_service.Game = new pacMan.Services.Game(new Queue<DirectionalPosition>());
|
||||
Assert.Throws<InvalidOperationException>(() => _service.FindNextPlayer());
|
||||
Assert.Throws<PlayerNotFoundException>(() => _service.FindNextPlayer());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -6,8 +6,7 @@ using pacMan.Utils;
|
||||
|
||||
namespace BackendTests.Services;
|
||||
|
||||
[TestFixture]
|
||||
[TestOf(nameof(pacMan.Services.Game))]
|
||||
[TestFixture, TestOf(nameof(pacMan.Services.Game))]
|
||||
public class GameTests
|
||||
{
|
||||
[SetUp]
|
||||
@ -56,7 +55,7 @@ public class GameTests
|
||||
[Test]
|
||||
public void NextPlayer_WhenEmpty()
|
||||
{
|
||||
Assert.Throws<InvalidOperationException>(() => _game.NextPlayer());
|
||||
Assert.Throws<PlayerNotFoundException>(() => _game.NextPlayer());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
Reference in New Issue
Block a user