Exemplo n.º 1
0
        private void ValidateResult(int[,] expected, int[,] input)
        {
            var inputCopy = MatrixHelpers.CreateTwoDimensionalMatrix(input.GetLength(0), input.GetLength(1), input.Cast <int>().ToArray());

            Question_1_8.PropogateZeros(input);
            TestHelpers.AssertMatricesEqual(expected, input);
            Question_1_8.PropogateZerosInPlace(inputCopy);
            TestHelpers.AssertMatricesEqual(expected, inputCopy);
        }
Exemplo n.º 2
0
 public void Question_1_8_InvalidCases()
 {
     TestHelpers.AssertExceptionThrown(() => Question_1_8.PropogateZeros(null), typeof(ArgumentNullException));
     TestHelpers.AssertExceptionThrown(() => Question_1_8.PropogateZerosInPlace(null), typeof(ArgumentNullException));
 }