Namespace: Blocks
Assembly: Blocks (in Blocks.exe) Version: 1.1.1.0 (1.1.1)
Tests: Blocks.Tests.ControllerTests
2 unit tests call Blocks.Controller.RotateBlockAntiClockwiseIfPossible
Assembly: Blocks (in Blocks.exe) Version: 1.1.1.0 (1.1.1)
Syntax
Remarks
Examples
[Test, CloseAfterFirstFrame] public void RotateClockwise() { Assert.IsFalse(sounds.BlockMoved.IsAnyInstancePlaying); controller.FallingBlock = new Block(displayMode, content, new Vector2D(8, 1)); controller.RotateBlockAntiClockwiseIfPossible(); Assert.IsTrue(sounds.BlockMoved.IsAnyInstancePlaying); controller.FallingBlock.Left = 11; controller.RotateBlockAntiClockwiseIfPossible(); }
[Test, CloseAfterFirstFrame] public void CurrentBlockBeingNullWillNotCrashMovement() { controller.FallingBlock = null; Assert.DoesNotThrow(controller.MoveBlockLeftIfPossible); Assert.DoesNotThrow(controller.MoveBlockRightIfPossible); Assert.DoesNotThrow(controller.RotateBlockAntiClockwiseIfPossible); }
See Also