Tests.QueriableMatrixTests.TestIfTakeColumnsMethodReturnAllColumnsCorrectlyAsJaggedArray C# (CSharp) Method

TestIfTakeColumnsMethodReturnAllColumnsCorrectlyAsJaggedArray() private method

        public void TestIfTakeColumnsMethodReturnAllColumnsCorrectlyAsJaggedArray()
        {
            var matrix = new int[,]
            {
                { 1, 2, 3 },
                { 5, 6, 7 },
                { 9, 10, 11 }
            };

            var queriableMatrix = new QueryableMatrix<int>(matrix);

            var actual = queriableMatrix.TakeColumns();

            var expected = new int[][]
            {
                new int[] { 1, 5, 9 },
                new int[] { 2, 6, 10 },
                new int[] { 3, 7, 11 }
            };

            for (int i = 0; i < 3; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    Assert.AreEqual(expected[i][j], actual[i][j]);
                }
            }
        }