Refactored some tests, added IClonable to Player

This commit is contained in:
martin
2023-10-21 12:28:09 +02:00
parent 719d37c6ee
commit a8fe82dd50
4 changed files with 25 additions and 45 deletions

View File

@ -123,9 +123,9 @@ public class GameTests
[Test]
public void AddPlayer_WhenNameExists()
{
var redClone = _redPlayer.Clone();
var redClone = _redPlayer.Clone() as Player;
_game.AddPlayer(_redPlayer);
Assert.DoesNotThrow(() => _game.AddPlayer(redClone));
Assert.DoesNotThrow(() => _game.AddPlayer(redClone!));
}
[Test]