Exemplo n.º 1
0
        public void FromTopToBottom_Returns_Path()
        {
            // Arrange
            int[,] matrix = new int[3, 3]
            {
                { 1, 2, 3 },
                { 6, 5, 4 },
                { 7, 8, 9 }
            };

            // Act
            var result = IterationInMatrix.FromTopToBottom(matrix);

            // Assert
            Assert.AreEqual(">>v<<v>>", result.Item1);
        }
Exemplo n.º 2
0
        public void FromBottomToTop_Returns_Path()
        {
            // Arrange
            int[,] matrix = new int[3, 3]
            {
                { 1, 2, 3 },
                { 6, 5, 4 },
                { 7, 8, 9 }
            };

            // Act
            var result = IterationInMatrix.FromBottomToTop(matrix, -1);

            // Assert
            Assert.AreEqual("<<^>>^<<", result.Item1);
        }