Example #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"));
        }
Example #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"));
        }
Example #3
0
        public void OneDimentionTest()
        {
            ActualMatrix matrix = new ActualMatrix(1);

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

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

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