Esempio n. 1
0
        public void MoveAndClean_returns_next_tile(Direction direction, int expectedXdelta, int expectedYdelta, OfficeRoom sut)
        {
            var currentPosition = new Tile(0, 0);

            var newPosition = sut.MoveAndClean(currentPosition, direction);

            Assert.That(newPosition.X, Is.EqualTo(currentPosition.X + expectedXdelta));
            Assert.That(newPosition.Y, Is.EqualTo(currentPosition.Y + expectedYdelta));
        }
Esempio n. 2
0
        public void MoveAndClean_adds_new_tile_to_cleaned_tiles(Direction direction, OfficeRoom sut)
        {
            var currentPosition = new Tile(0, 0);

            Assume.That(sut.CleanedTiles, Is.Empty);

            var newPosition = sut.MoveAndClean(currentPosition, direction);

            Assert.That(sut.CleanedTiles, Contains.Item(newPosition));
        }
Esempio n. 3
0
        public void MoveAndClean_adds_current_tile_to_cleaned_tiles(Direction direction, [Frozen] int size, OfficeRoom sut)
        {
            var currentPosition = GetPositionOnBoundary(direction, size);

            Assume.That(sut.CleanedTiles, Is.Empty);

            sut.MoveAndClean(currentPosition, direction);

            Assert.That(sut.CleanedTiles, Contains.Item(currentPosition));
        }