Example #1
0
    public void DefaultMazeCellZIsNotValid()
    {
        // Arrange and Act
        MazeCellZ mazeCell = new MazeCellZ();

        // Assert
        Assert.IsFalse(mazeCell.IsValid());         // A MazeCellZ is constructed with four walls
    }
Example #2
0
    public void MazeCellZHasValidNumberOfWallsTest()
    {
        // Arrange
        MazeCellZ mazeCell = new MazeCellZ();

        // Act and Assert
        mazeCell.RemoveWall(WallIndex.NorthWall);
        Assert.IsTrue(mazeCell.IsValid());

        mazeCell.RemoveWall(WallIndex.EastWall);
        Assert.IsTrue(mazeCell.IsValid());

        mazeCell.RemoveWall(WallIndex.SouthWall);
        Assert.IsTrue(mazeCell.IsValid());

        mazeCell.RemoveWall(WallIndex.WestWall);
        Assert.IsTrue(mazeCell.IsValid());
    }