diff --git a/BackendTests/Services/ActionServiceTests.cs b/BackendTests/Services/ActionServiceTests.cs index 00bb70a..279ec3b 100644 --- a/BackendTests/Services/ActionServiceTests.cs +++ b/BackendTests/Services/ActionServiceTests.cs @@ -165,7 +165,7 @@ public class ActionServiceTests // If selected the state is changed to InGame _whitePlayer.State = State.InGame; var players = result.GetType().GetProperty("Players")?.GetValue(result) as IEnumerable; - Assert.That(players?.First().Name, Is.EqualTo(_whitePlayer.Name)); + Assert.That(players?.First().UserName, Is.EqualTo(_whitePlayer.UserName)); } [Test] @@ -185,7 +185,7 @@ public class ActionServiceTests result = _service.Ready(); var players = result.GetType().GetProperty("Players")?.GetValue(result) as IEnumerable; - Assert.That(players?.First().Name, Is.EqualTo(_blackPlayer.Name).Or.EqualTo(_whitePlayer.Name)); + Assert.That(players?.First().UserName, Is.EqualTo(_blackPlayer.UserName).Or.EqualTo(_whitePlayer.UserName)); } #endregion @@ -208,7 +208,7 @@ public class ActionServiceTests { Players = { _whitePlayer } }; var name = _service.FindNextPlayer(); - Assert.That(name, Is.EqualTo(_whitePlayer.Name)); + Assert.That(name, Is.EqualTo(_whitePlayer.UserName)); } [Test] @@ -222,9 +222,9 @@ public class ActionServiceTests })) { Players = { _whitePlayer, _blackPlayer } }; var first = _service.FindNextPlayer(); - Assert.That(first, Is.EqualTo(_blackPlayer.Name)); + Assert.That(first, Is.EqualTo(_blackPlayer.UserName)); var second = _service.FindNextPlayer(); - Assert.That(second, Is.EqualTo(_whitePlayer.Name)); + Assert.That(second, Is.EqualTo(_whitePlayer.UserName)); } #endregion diff --git a/BackendTests/TestUtils/Players.cs b/BackendTests/TestUtils/Players.cs index 5c68b9f..07e46da 100644 --- a/BackendTests/TestUtils/Players.cs +++ b/BackendTests/TestUtils/Players.cs @@ -8,7 +8,7 @@ internal static class Players internal static IPlayer Create(string colour) => new Player { - Name = colour, + UserName = colour, Colour = colour, PacMan = CreatePacMan(colour), Box = CreateBox(colour) @@ -33,7 +33,7 @@ internal static class Players { Box = player.Box, Colour = player.Colour, - Name = player.Name, + UserName = player.UserName, PacMan = player.PacMan }; } diff --git a/pac-man-board-game/ClientApp/src/components/gameBoard.tsx b/pac-man-board-game/ClientApp/src/components/gameBoard.tsx index 5f888db..c6b6092 100644 --- a/pac-man-board-game/ClientApp/src/components/gameBoard.tsx +++ b/pac-man-board-game/ClientApp/src/components/gameBoard.tsx @@ -181,8 +181,8 @@ const SelectPlayerModal: Component = () => { { allPlayers.map(player => -
- {player.Name} has {player.Box.count} pellets +
+ {player.UserName} has {player.Box.count} pellets