Tests fonctionnels git add .git add .git add .git add .git add .git add .! 🤞
continuous-integration/drone/push Build encountered an error Details

pull/55/head
Remi NEVEU 12 months ago
parent 619e53927f
commit dd811a8c69

@ -25,4 +25,19 @@ public class Player
return Operation.LOWER;
}
public override bool Equals(object? obj)
{
if (obj == null || GetType() != obj.GetType())
{
return false;
}
Player c = (Player)obj;
return (Pseudo == c.Pseudo);
}
// Redefinition de la méthode de Hash pour l'opérateur ==
public override int GetHashCode()
{
return Pseudo.GetHashCode();
}
}

@ -7,7 +7,7 @@ public class CellTest
public void CellConstructorTest()
{
Cell cell = new Cell(0, 0);
Assert.Equal(0, cell.X);
Assert.Equal(0,cell.Y);
Assert.Equal(0, cell.Pos.X);
Assert.Equal(0,cell.Pos.Y);
}
}

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Models;
using Models.Game;
namespace Tests;

@ -1,5 +1,5 @@
namespace Tests;
using Models;
using Models.Game;
public class PlayerTest
{
@ -20,7 +20,7 @@ public class PlayerTest
public void PlayerIsEqualTest()
{
Player player = new Player("John");
Player player2 = new Player("John","DefaultProfilePicture");
Player player2 = new Player("John", "DefaultProfilePicture");
Player player3 = new Player("Inconnu","N/A");
Assert.Equal(player, player2);

Loading…
Cancel
Save