public void SquareLabyrinthFillMatrixTest() { var charGeneratorMock = new Mock <IRandomCharProvider>(); bool isFilled = false; charGeneratorMock.Setup( x => x.GetRandomSymbol(It.IsAny <int>())).Callback( () => { isFilled = true; }); var squareLabyrinth = new SquareLabyrinth(); squareLabyrinth.FillMatrix(charGeneratorMock.Object); Assert.IsTrue(isFilled, "Pentagon labyrinth matrix should be filled."); }