Esempio n. 1
0
        public void SixDimentionTest()
        {
            ActualMatrix matrix = new ActualMatrix(6);

            Assert.IsTrue(matrix.ToString() == string.Format("{0}\r\n{1}\r\n{2}\r\n{3}\r\n{4}\r\n{5}\r\n",
                                                            "  1 16 17 18 19 20",
                                                            " 15  2 27 28 29 21",
                                                            " 14 31  3 26 30 22",
                                                            " 13 36 32  4 25 23",
                                                            " 12 35 34 33  5 24",
                                                            " 11 10  9  8  7  6"));
        }
Esempio n. 2
0
        public void ThreeDimentionTest()
        {
            ActualMatrix matrix = new ActualMatrix(3);

            Assert.IsTrue(matrix.ToString() == string.Format("  1  7  8\r\n  6  2  9\r\n  5  4  3\r\n"));
        }
Esempio n. 3
0
        public void OneDimentionTest()
        {
            ActualMatrix matrix = new ActualMatrix(1);

            Assert.IsTrue(matrix.ToString() == string.Format("  1\r\n"));
        }
Esempio n. 4
0
        public void TwoDimentionTest()
        {
            ActualMatrix matrix = new ActualMatrix(2);

            Assert.IsTrue(matrix.ToString() == string.Format("  1  4\r\n  3  2\r\n"));
        }
Esempio n. 5
0
 public void TooBigDimentionsTest()
 {
     ActualMatrix matrix = new ActualMatrix(101);
 }
Esempio n. 6
0
 public void NegativeDimentionsTest()
 {
     ActualMatrix matrix = new ActualMatrix(-1);
 }
Esempio n. 7
0
 public void ZeroDimentionsTest()
 {
     ActualMatrix matrix = new ActualMatrix(0);
 }
Esempio n. 8
0
        static void Main()
        {
            ActualMatrix matrix = new ActualMatrix(3);

            Console.WriteLine(matrix);
        }
Esempio n. 9
0
 static void Main()
 {
     ActualMatrix matrix = new ActualMatrix(3);
     Console.WriteLine(matrix);
 }