public void TestMethodShapeT_MoveLeft() { //arrange IBoard board = new Board(); ShapeT shape = new ShapeT(board); //act shape.MoveLeft(); //assert Assert.AreEqual(3, shape[0].Position.X); Assert.AreEqual(0, shape[0].Position.Y); Assert.AreEqual(4, shape[1].Position.X); Assert.AreEqual(0, shape[1].Position.Y); Assert.AreEqual(4, shape[2].Position.X); Assert.AreEqual(1, shape[2].Position.Y); Assert.AreEqual(5, shape[3].Position.X); Assert.AreEqual(0, shape[3].Position.Y); }
public void TestShapeT_DownRotateRight() { //arrange IBoard board = new Board(); ShapeT shape = new ShapeT(board); //act shape.MoveDown(); shape.Rotate(); shape.MoveLeft(); //assert Assert.AreEqual(new Point(4, 2), shape[0].Position); Assert.AreEqual(new Point(4, 1), shape[1].Position); Assert.AreEqual(new Point(5, 1), shape[2].Position); Assert.AreEqual(new Point(4, 0), shape[3].Position); }
public void TestShapeT_AllLeft() { //arrange IBoard board = new Board(); ShapeT shape = new ShapeT(board); //act shape.MoveLeft(); shape.MoveLeft(); shape.MoveLeft(); shape.MoveLeft(); shape.MoveLeft(); //assert Assert.AreEqual(new Point(0, 0), shape[0].Position); Assert.AreEqual(new Point(1, 0), shape[1].Position); Assert.AreEqual(new Point(1, 1), shape[2].Position); Assert.AreEqual(new Point(2, 0), shape[3].Position); }