Ejemplo n.º 1
0
        public void TravelToLeft(double testDistance)
        {
            var startPos = new GridCoordinate();

            const double leftDegree = 180;

            var finishPos = startPos.TravelTo(leftDegree, testDistance);

            var expectedFinishPos = new GridCoordinate(
                xPosition: -1 * testDistance,
                yPosition: 0);

            Assert.Equal(expectedFinishPos, finishPos);
        }
Ejemplo n.º 2
0
        public void TravelToStraightUp(double testDistance)
        {
            var startPos = new GridCoordinate();

            const double upDegree = 90;

            var finishPos = startPos.TravelTo(upDegree, testDistance);

            var expectedFinishPos = new GridCoordinate(
                xPosition: 0,
                yPosition: testDistance);

            Assert.Equal(expectedFinishPos, finishPos);
        }