public void TestConstructorIfReturnValidRowLenthWithSeven() { var grid = new Grid(7, 7); var expect = grid.TotalRows; var actual = 7; Assert.AreEqual(expect, actual); }
public void TestConstructorIfReturnValidRowLenthWithDefautValue() { var grid = new Grid(); var expect = grid.TotalRows; var actual = 15; Assert.AreEqual(expect, actual); }
public void TestSetCellMethodIfSetCurrectlyValueWithIntValueParameter() { var grid = new Grid(); grid.SetCell(3, 3, 'X'); var expect = 'X'; var actual = grid.Field[3, 3]; Assert.AreEqual(expect, actual); }
public void TestSetCellMethodIfSetCurrectlyValueWithPositionValue() { var position = new Position(3, 3); var grid = new Grid(); grid.SetCell(position.X, position.Y, 'X'); var expect = 'X'; var actual = grid.Field[3, 3]; Assert.AreEqual(expect, actual); }
public void GenerateGridMethodShouldBeReturnValidMatrixLength() { var grid = new Grid(7, 7); var player = new Player(); var initializer = new Initializer(); var actual = initializer.GenerateGrid(player, grid); var expextetHorizontalLength = 7; var expextetVerticalLength = 7; Assert.AreEqual(expextetHorizontalLength, actual.Field.GetLength(0)); Assert.AreEqual(expextetVerticalLength, actual.Field.GetLength(1)); }