public void ReturnsTurnsInRightOrder() { StringMoveParser parser = new StringMoveParser(); List<IMove> moves = parser.GetMoves("LR"); Assert.IsInstanceOfType(moves.First(), typeof(LeftTurn)); Assert.IsInstanceOfType(moves.Skip(1).First(), typeof(RightTurn)); }
public void ReturnsForOneMove() { StringMoveParser parser = new StringMoveParser(); List<IMove> moves = parser.GetMoves("M"); Assert.IsInstanceOfType(moves.First(), typeof(Move)); Assert.AreEqual(1, moves.Count); }
public void ReturnsTwoMovesForTwoRight() { StringMoveParser parser = new StringMoveParser(); List<IMove> moves = parser.GetMoves("RR"); Assert.AreEqual(2, moves.Count); }
public void ReturnsMovesForOneLeft() { StringMoveParser parser = new StringMoveParser(); List<IMove> moves = parser.GetMoves("L"); Assert.AreEqual(1, moves.Count); }
public void ReturnsForOneRight() { StringMoveParser parser = new StringMoveParser(); List<IMove> moves = parser.GetMoves("R"); Assert.IsInstanceOfType(moves.First(), typeof(RightTurn)); }