Esempio n. 1
0
        public void MoveLeftTest()
        {
            for (int i = 0; i < 7; i++)
            {
                int currentHorizontalPosition = (int)_canvas.Width - 4 * _width;

                Figure figure = new Figure(i, _canvas, _width, _width, _width);
                figure.SetLocation(currentHorizontalPosition, _width * 4);
                MovementHelper.MoveLeft(figure, _canvas);
                int newHorizontalPosition = figure.Left;
                Assert.IsTrue(currentHorizontalPosition == newHorizontalPosition + _width);
                //Debug.WriteLine("{0} {1}", currentHorizontalPosition, newHorizontalPosition);
                _canvas.Children.Clear();
            }
        }