Files
Giants/Tests/Giants.Core.Tests/Entities/MatchTests.cs
mcmuzzle 80b3d71104
All checks were successful
check main state / build (9.0.x) (push) Successful in 1m28s
Mise en place des MatchCommand
Ajout des données dynamiques au match
2025-04-03 00:15:11 +02:00

35 lines
750 B
C#

using System.Reflection;
using Giants.Application;
using Giants.Core.Interfaces;
using Giants.Infrastructure;
namespace Giants.Core.Tests;
public class MatchTests
{
private readonly IMatchRepository _repo;
public MatchTests()
{
IHexagonalGrid _grid = new HexagonalGridImpl();
BoardLayout layout = new BoardLayout(_grid);
_repo = new MatchRepositoryMock(layout);
var match1 = _repo.CreateMatch();
}
[Fact]
public void MatchClone()
{
Match? match = _repo.CreateMatch();
Assert.NotNull(match);
match.AssignPiece(Enums.PieceIndex.StartPlayer, Enums.PiecePosition.player1Visible);
Match clone = match.Clone();
Assert.Equal(clone, match);
}
}