⚙️ Ajout des tests pour les règles decheminsde corde
continuous-integration/drone/push Build is passing Details

pull/74/head
Rémi LAVERGNE 11 months ago
parent 379c709589
commit 9dc789c3ec
No known key found for this signature in database
GPG Key ID: CA264B55E97FD220

@ -73,4 +73,26 @@ public class RulesTests
Cell cell2 = new Cell(1, 1);
Assert.True(rules.IsCellAdjacent(cell1, cell2));
}
[Fact]
public void IsInRopePaths_ReturnsTrue_WhenCellsAreInRopePaths()
{
Rules rules = new Rules();
Cell cell1 = new Cell(0, 0);
Cell cell2 = new Cell(0, 1);
Map map = new Map("background");
map.RopePaths.Add(new List<Cell> { cell1, cell2 });
Assert.True(rules.IsInRopePaths(cell2, map.RopePaths, 0));
}
[Fact]
public void IsInRopePaths_ReturnsFalse_WhenCellsAreNotInRopePaths()
{
Rules rules = new Rules();
Cell cell1 = new Cell(0, 0);
Cell cell2 = new Cell(0, 1);
Map map = new Map("background");
map.RopePaths.Add(new List<Cell> { cell1 });
Assert.False(rules.IsInRopePaths(cell2, map.RopePaths, 0));
}
}
Loading…
Cancel
Save