public void CheckIfLifeTest_1Nieghbours() { int[,] inputMatrix = { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } }; int[,] expectedMatrix = { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } }; CollectionAssert.AreEqual(expectedMatrix, GeterResultArray.CheckIfLife(inputMatrix, 0, 0, 1)); }
public void GetArrayOfNeighboursTest() { int[,] inputMatrix = { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 1, 1 }, { 0, 1, 1, 1 } }; int[,] expectedMatrix = { { 0, 0, 0, 0 }, { 0, 0, 1, 1 }, { 0, 1, 0, 1 }, { 0, 1, 0, 1 } }; CollectionAssert.AreEqual(expectedMatrix, GeterResultArray.GetArrayOfNeighbours(4, 4, inputMatrix)); }