Updated dependencies and project to C# 12 Added primary constructors and many other refactorings
This commit is contained in:
@ -51,4 +51,26 @@ public class GameControllerTests
|
||||
else
|
||||
Assert.Fail("Result is not an ArraySegment<byte>");
|
||||
}
|
||||
|
||||
#region DoAction(ActionMessage message)
|
||||
|
||||
[Test]
|
||||
public void DoAction_NegativeAction()
|
||||
{
|
||||
const string data = "Nothing happens";
|
||||
var message = new ActionMessage { Action = (GameAction)(-1), Data = data };
|
||||
_controller.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 };
|
||||
_controller.DoAction(message);
|
||||
Assert.That(message.Data, Is.EqualTo(data));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
Reference in New Issue
Block a user