Updated build target to dotnet 12. Fixed failed tests and runtime failures

This commit is contained in:
Martin Berg Alstad
2023-12-10 15:39:26 +01:00
parent 9991bac6fa
commit 3e424a127e
10 changed files with 22 additions and 33 deletions

View File

@ -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]

View File

@ -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]