Ejemplo n.º 1
0
        public void SixDimentionTest()
        {
            MatrixRotatingWalk matrix = new MatrixRotatingWalk(6);

            Assert.AreEqual(matrix.ToString(), string.Format("{0}{6}{1}{6}{2}{6}{3}{6}{4}{6}{5}{6}",
                                                             "  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",
                                                             Environment.NewLine));
        }
Ejemplo n.º 2
0
        public void ThreeDimentionTest()
        {
            MatrixRotatingWalk matrix = new MatrixRotatingWalk(3);

            Assert.AreEqual(matrix.ToString(), string.Format("  1  7  8{0}  6  2  9{0}  5  4  3{0}", Environment.NewLine));
        }
Ejemplo n.º 3
0
        public void TwoDimentionTest()
        {
            MatrixRotatingWalk matrix = new MatrixRotatingWalk(2);

            Assert.IsTrue(matrix.ToString() == string.Format("  1  4{0}  3  2{0}", Environment.NewLine));
        }
Ejemplo n.º 4
0
 public void TooBigDimentionsTest()
 {
     MatrixRotatingWalk matrix = new MatrixRotatingWalk(101);
 }
Ejemplo n.º 5
0
 public void NegativeDimentionsTest()
 {
     MatrixRotatingWalk matrix = new MatrixRotatingWalk(-1);
 }
Ejemplo n.º 6
0
 public void ZeroDimentionsTest()
 {
     MatrixRotatingWalk matrix = new MatrixRotatingWalk(0);
 }