Beispiel #1
0
        public void Extract_row_from_one_number_matrix()
        {
            var sut = new MatrixParser("1");

            Assert.Equal(new[] { 1 }, sut.Row(0));
        }
Beispiel #2
0
        public void Extract_row_where_numbers_have_different_widths()
        {
            var sut = new MatrixParser("1 2\n10 20");

            Assert.Equal(new[] { 10, 20 }, sut.Row(1));
        }
Beispiel #3
0
        public void Can_extract_row_from_non_square_matrix()
        {
            var sut = new MatrixParser("1 2 3\n4 5 6\n7 8 9\n8 7 6");

            Assert.Equal(new[] { 7, 8, 9 }, sut.Row(2));
        }
Beispiel #4
0
        public void Can_extract_row()
        {
            var sut = new MatrixParser("1 2\n3 4");

            Assert.Equal(new[] { 3, 4 }, sut.Row(1));
        }