Namespace: Breakout
Assembly: Breakout (in Breakout.exe) Version: 1.1.1.0 (1.1.1)
Tests: Breakout.Tests.LevelTests
3 unit tests call Breakout.Level.BricksLeft
Assembly: Breakout (in Breakout.exe) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: Int32Remarks
Examples
[Test, CloseAfterFirstFrame] public void CheckEmptyLevel() { Resolve<Paddle>(); var level = Resolve<EmptyLevel>(); Assert.IsNull(level.GetBrickAt(0.25f, 0.25f)); Assert.IsNull(level.GetBrickAt(0.5f, 0.25f)); Assert.IsNull(level.GetBrickAt(0.75f, 0.35f)); Assert.AreEqual(0, level.BricksLeft); }
[Test, CloseAfterFirstFrame] public void RemoveBrick() { var level = Resolve<Level>(); Assert.AreEqual(4, level.BricksLeft); var brick = level.GetBrickAt(0.25f, 0.25f); Assert.IsTrue(brick.IsVisible); brick.IsVisible = false; Assert.AreEqual(3, level.BricksLeft); Assert.IsNull(level.GetBrickAt(0.25f, 0.25f)); }
[Test, CloseAfterFirstFrame] public void BricksLeft() { var level = Resolve<Level>(); level.GetBrickAt(0.25f, 0.125f).IsVisible = false; level.GetBrickAt(0.75f, 0.125f).IsVisible = false; level.GetBrickAt(0.25f, 0.375f).IsVisible = false; level.GetBrickAt(0.75f, 0.375f).IsVisible = false; Assert.AreEqual(0, level.BricksLeft); }
See Also