CanBeMultipliedBy() public method

Checks to see if this matrix can be multiplied by the passed matrix IN THAT ORDER. In order to multiply two matrices, the number of columns in the first matrix must equal the number of rows in the second matrix.
public CanBeMultipliedBy ( Matrix passedMatrix ) : bool
passedMatrix Matrix
return bool
        public void Matrix_CanBeMultipliedTest()
        {
            Matrix matrix1 = new Matrix(3, 2);
            matrix1.SetElement(0, 0, 1);
            matrix1.SetElement(0, 1, 1);
            matrix1.SetElement(1, 0, 2);
            matrix1.SetElement(1, 1, 0);
            matrix1.SetElement(2, 0, 0);
            matrix1.SetElement(2, 1, 3);

            Matrix matrix2 = new Matrix(2, 4);
            matrix2.SetElement(0, 0, 0);
            matrix2.SetElement(0, 1, 1);
            matrix2.SetElement(0, 2, 1);
            matrix2.SetElement(0, 3, 0);
            matrix2.SetElement(1, 0, 2);
            matrix2.SetElement(1, 1, 3);
            matrix2.SetElement(1, 2, 0);
            matrix2.SetElement(1, 3, 1);

            bool result = matrix1.CanBeMultipliedBy(matrix2);

            result.Should().BeTrue();

        }