Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jnccd committed Feb 26, 2024
1 parent 7b667e6 commit 3b1bd16
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions socha-tests/Backend/BoardTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@ public class BoardTests
[TestMethod()]
public void BoardIsCorrectlyCloned()
{
//Board board = new();
//board.GetField(1, 1).fishes = 2;
Board board = new();
board.SetField(new CubeCoords(1, 1), new Field(FieldType.island, false, new CubeCoords(1, 1), board));

//var clone = (Board)board.Clone();
//clone.GetField(2, 2).fishes = 3;
var clone = (Board)board.Clone();
clone.SetField(new CubeCoords(1, 1), new Field(FieldType.water, false, new CubeCoords(1, 1), board));

//Assert.AreEqual(board.GetField(1, 1).fishes, 2);
//Assert.AreEqual(board.GetField(2, 2).fishes, 0);
Assert.AreEqual(board.GetField(1, 1).FType, FieldType.island);

//Assert.AreEqual(clone.GetField(1, 1).fishes, 2);
//Assert.AreEqual(clone.GetField(2, 2).fishes, 3);
Assert.AreEqual(clone.GetField(1, 1).FType, FieldType.water);
}
}
}

0 comments on commit 3b1bd16

Please sign in to comment.