Updated dependencies and project to C# 12 Added primary constructors and many other refactorings

This commit is contained in:
martin
2023-11-18 23:47:55 +01:00
parent b0c6641ea2
commit 2520a9ed94
28 changed files with 266 additions and 285 deletions

View File

@ -2,6 +2,7 @@ using System.Text.Json;
using BackendTests.TestUtils;
using Microsoft.Extensions.Logging;
using NSubstitute;
using pacMan.DTOs;
using pacMan.Exceptions;
using pacMan.GameStuff;
using pacMan.GameStuff.Items;
@ -99,28 +100,6 @@ public class ActionServiceTests
#endregion
#region DoAction(ActionMessage message)
[Test]
public void DoAction_NegativeAction()
{
const string data = "Nothing happens";
var message = new ActionMessage { Action = (GameAction)(-1), Data = data };
_service.DoAction(message);
Assert.That(message.Data, Is.EqualTo(data));
}
[Test]
public void DoAction_OutOfBoundsAction()
{
const string data = "Nothing happens";
var message = new ActionMessage { Action = (GameAction)100, Data = data };
_service.DoAction(message);
Assert.That(message.Data, Is.EqualTo(data));
}
#endregion
#region Ready()
[Test]

View File

@ -1,7 +1,6 @@
using System.Net.WebSockets;
using Microsoft.Extensions.Logging;
using NSubstitute;
using pacMan.Interfaces;
using pacMan.Services;
using pacMan.Utils;