Exemplo n.º 1
0
        public void Matrix_ExpextToBeCorrectOnSize6()
        {
            int          size   = 6;
            MatrixEngine matrix = new MatrixEngine(testingConsole, size);

            matrix.Run();
            matrix.PrintMatrix();
            string result   = testingConsole.GetWriteText();
            string expected = "  1 16 17 18 19 20\n 15  2 27 28 29 21\n 14 31  3 26 30 22\n 13 36 32  4 25 23\n 12 35 34 33  5 24\n 11 10  9  8  7  6";

            Assert.AreEqual(expected, result, "Expected matrix 6x6");
        }
Exemplo n.º 2
0
        public void Matrix_ExpextToBeCorrectOnSize3()
        {
            int          size   = 3;
            MatrixEngine matrix = new MatrixEngine(testingConsole, size);

            matrix.Run();
            matrix.PrintMatrix();
            string result   = testingConsole.GetWriteText();
            string expected = "  1  7  8\n  6  2  9\n  5  4  3";

            Assert.AreEqual(expected, result, "Expected matrix 3x3");
        }