Ejemplo n.º 1
0
        public void Scrambler_ShouldReturnUnsolvedCube()
        {
            var cube      = new Cube();
            var scrambler = new Scrambler();
            var result    = scrambler.ScrambleCube();

            foreach (var(turn, clockwise, count) in result.Turns)
            {
                cube.Move(turn, clockwise, count);
            }

            cube.Left.Should().BeEquivalentTo(result.Cube.Left);
            cube.Front.Should().BeEquivalentTo(result.Cube.Front);
            cube.Up.Should().BeEquivalentTo(result.Cube.Up);
            cube.Right.Should().BeEquivalentTo(result.Cube.Right);
            cube.Down.Should().BeEquivalentTo(result.Cube.Down);
            cube.Back.Should().BeEquivalentTo(result.Cube.Back);
        }