public void TestEmptyMoves() { IMoveParser parser = new StringMoveParser(); IMoveSupplier supplier = new StandardMoveSupplier(parser); supplier.Init(""); Assert.IsFalse(supplier.HasNextMove()); }
public void TestOneMove() { IMoveParser parser = new StringMoveParser(); IMoveSupplier supplier = new StandardMoveSupplier(parser); supplier.Init("L"); Assert.IsTrue(supplier.HasNextMove()); supplier.NextMove(); Assert.IsFalse(supplier.HasNextMove()); }
public void TestTwoMovesAreInCorrectOrder() { IMoveParser parser = new StringMoveParser(); IMoveSupplier supplier = new StandardMoveSupplier(parser); supplier.Init("LR"); Assert.IsTrue(supplier.HasNextMove()); Assert.IsInstanceOfType(supplier.NextMove(), typeof(LeftTurn)); Assert.IsInstanceOfType(supplier.NextMove(), typeof(RightTurn)); Assert.IsFalse(supplier.HasNextMove()); }