TotalRows() public method

Returns the total number of rows required to contain all of the rows from the inner matrices
public TotalRows ( ) : int
return int
コード例 #1
0
        public void TotalRowsTest_EqualRowDistances()
        {
            Matrix m1 = new Matrix(2);
            Matrix m2 = new Matrix(2, 3);
            Matrix m3 = new Matrix(2);
            Matrix m4 = new Matrix(2, 3);
            
            MatricesMatrix testMatricesMatrix = new MatricesMatrix(2, 2);

            testMatricesMatrix.SetElement(0, 0, m1);
            testMatricesMatrix.SetElement(0, 1, m2);
            testMatricesMatrix.SetElement(1, 0, m3);
            testMatricesMatrix.SetElement(1, 1, m4);

            int expectedResult = 4;

            int actualResult = testMatricesMatrix.TotalRows();

            (actualResult == expectedResult).Should().BeTrue();

        }