示例#1
0
        public void InitialMovement()
        {
            var cleanedSpots    = new CleanedSpots();
            var currentPosition = new Position(0, 0);

            var result = cleanedSpots.CalculateCleanedSpots(new[] { currentPosition });

            Assert.AreEqual(1, result);
        }
示例#2
0
        public void ComparePositionsToAddCleanedSpots(int x, int y)
        {
            var cleanedSpots     = new CleanedSpots();
            var previousPosition = new Position(0, 0);
            var currentPosition  = new Position(x, y);

            var result = cleanedSpots.CalculateCleanedSpots(new[] { currentPosition, previousPosition });

            Assert.AreEqual(3, result);
        }
示例#3
0
        public void ShouldCountUniqueSpotsMovingHorizontal()
        {
            var cleanedSpots = new CleanedSpots();

            var result = cleanedSpots.CalculateCleanedSpots(new[] {
                new Position(0, 0),
                new Position(0, 10),
                new Position(0, 0)
            });

            Assert.AreEqual(11, result);
        }