public void IsRandomizedEmptyCellTest() { IMatrixGenerator matrixGenerator = new SortedMatrixGenerator(4); int[,] matrix = matrixGenerator.GenerateMatrix(); MatrixEmptyCellRandomizator matrixRandomizator = new MatrixEmptyCellRandomizator(); matrixRandomizator.Randomize(matrix); MatrixComparer comparer = new MatrixComparer(); Assert.IsFalse(comparer.IsSorted(matrix)); }
public void IsRandomTest() { IMatrixGenerator matrixGenerator = new SortedMatrixGenerator(4); var firstRandomMatrix = matrixGenerator.GenerateMatrix(); var secondRandomMatrix = matrixGenerator.GenerateMatrix(); MatrixEmptyCellRandomizator matrixRandomizator = new MatrixEmptyCellRandomizator(); matrixRandomizator.Randomize(firstRandomMatrix); matrixRandomizator.Randomize(secondRandomMatrix); MatrixComparer comparer = new MatrixComparer(); Assert.IsFalse(comparer.AreEqual(firstRandomMatrix, secondRandomMatrix)); }